Posts Daily Code Notes
Post
Cancel

Daily Code Notes

Nov. 2018

Nov. 15

  1. Insert picture to markdown.
    1
    2
    
    ![name](/assets/img/file.jpg)
    ![name](/assets/img/file.jpg)
    
  2. Tasks in markdown.
    1
    2
    
    - [ ] task to do
    - [x] task done
    
  3. Add two plots in one graph.
    1
    2
    3
    
    plot()
    par(new = TRUE)
    plot()
    

Nov. 16

  1. Add MathJax in order to compile $\LaTeX$ in markdown. Add the following script to the _includes/head.html
    1
    2
    3
    4
    5
    6
    7
    8
    9
    
     <script type="text/x-mathjax-config">
     MathJax.Hub.Config({
       tex2jax: {
         skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
         inlineMath: [['$','$']]
       }
     });
      </script>
      <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script> 
    
  2. Align two pictures in one row in markdown. Do remember to insert a blank line above and below the code.
    1
    
    ![picture1](address) | ![picture2](address)
    

Nov. 17

  1. Merge two data frames in R
    1
    
    merge(x, y, by = "ID", all.x = TRUE, all.y = TRUE)
    
This post is licensed under CC BY 4.0