Skip to content

erikaduan/r_tips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R programming tips

💻 Set up

🎨 Data visualisation

📚 Data cleaning

🔨 Productionisation

🔢 Statistical modelling

  • TBC

🔮 Machine learning

  • TBC

Other resources

The resources below also cover a comprehensive range of practical R tutorials.

Tutorial style guide

This repository now contains the following file naming and code style rules.

  • Folders are not ordered with a numerical prefix and names are not case sensitive e.g r_tips\tutorials\... and r_tips\figures\...
  • Tutorial subtopics share the same prefix e.g. r_tips\tutorials\dv-... for data visualisation tutorials and r_tips\tutorials\sm-... for statistical modelling tutorials
  • File names use - to separate tutorial topics and _ instead of other white space e.g. r_tips\figures\dv-using_diagrammer-simple_flowchart.svg
  • Comments are styled according to the tidyverse style guide:
    • The first comment explains the purpose of the code chunk and is styled differently for enhanced readability e.g. # Code as header --------
    • Comments are written in sentence case and only end with a full stop if they contain at least two sentences
    • Short comments explaining a function argument do not have to be written on a new line
    • Comments should not be followed by a blank line, unless the comment is a stand-alone paragraph containing in-depth rationale or an alternative solution
  • To render github documents:
    • Results are generally suppressed using results='hide' and manually entered in a new line beneath the code
    • Figures are generally outputed using fig.show='markdown' and individual figure outputs can then be suppressed using fig.show='hide' in a code chunk
  • Set a margin of 80 characters length in RStudio through Tools\Global options --> Code --> Display --> Show margin and use this margin as the cut-off for code and comments length

Acknowledgements

Many kudos to Dr Chuanxin Liu, my former PhD student and code editor, for teaching me how to code in R in my past life as an immunologist.

About

R programming tips for data cleaning, data visualisation, statistical modelling and machine learning

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published