Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

erikaduan/r_tips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 Data visualisation

📚 Data cleaning

🔨 Productionisation

🔢 Statistical modelling

🔮 Machine learning

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 no longer ordered with a numerical prefix and names are no longer case sensitive e.gr_tips\tutorials\... andr_tips\figures\...
  • Tutorial subtopics share the same prefix e.g.r_tips\tutorials\dv-... andr_tips\tutorials\st-...
  • File names contain- to separate file name prefixes and_ instead of other white space e.g.r_tips\figures\dv-using_diagrammer-simple_flowchart.svg
  • Comments are styled according to thetidyverse 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
  • R code chunks are styled as follows:
    • Each R chunk should be named with a short unique description written in the active voice e.g.create basic plot andmodify plot labels
    • Arguments inside code chunks should not contain white space and boolean argument options should be written in capitals e.g.{r load libraries, message=FALSE, warning=FALSE}
    • To render the github document, results are generally suppressed usingresults='hide' and manually entered in a new line beneath the code.
    • To render the github document, figures are generally outputed usingfig.show='markdown' and figure outputs can then be suppressed at the local chunk level usingfig.show='hide'
  • Set a margin of 80 characters length in RStudio throughTools\Global options --> Code --> Display --> Show margin and use this margin as the cut-off for code and comments length

Citations

Citing packages is a good practice when you are publishing research papers. To do this, usecitations("package") to print the relevant package publication. A non-exhaustive list of R packages used in this repository is found below.

Acknowledgements

Many kudos toDr 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 usage 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

[8]ページ先頭

©2009-2025 Movatter.jp