One tip per day M-F on the R programming language #rstats. Brought to you by the R community team at Microsoft.

Joined May 2011
A tutorial from @ROpenSci on reproducible research with Docker containers ropenscilabs.github.io/r-doc… #rstats
3
14
22
boot(data,statistic,R) in the {boot} package will generate R bootstrap replicates of a statistic cran.r-project.org/package=b… #rstats
8
18
Use saveRDS(obj,"myfile") and readRDS(obj,"myfile") to save / read an R object to / from a file rdocumentation.org/packages/… #rstats
7
19
To debug warnings, options(warn=2) converts warnings into errors rdocumentation.org/packages/… #rstats
7
11
Strip non-ASCII characters from a string with iconv(rich.text, to="ASCII", sub="") #rstats rdocumentation.org/packages/…
6
15
If two packages define functions with the same name, use :: to call the one you want: stackoverflow.com/q/39137110… #rstats
10
11
Use the Matrix package for efficient linear algebra with sparse, symmetric, positive semidefinite and general matrices jimskinner.github.io/post/el… #rstats
6
10
The "round" function uses the "round-to-even" rule. round(3.5) and round(4.5) are both 4 rdocumentation.org/packages/… #rstats
2
19
5
47
Look here rdocumentation.org/packages/… for documentation on mathematical functions like beta(a,b) or gamma(x) #rstats
3
7
Use R to add text, tables and charts to a Word or Powerpoint template with the officer package #rstats davidgohel.github.io/officer…
8
23
The story behind R release names like "Very Secure Dishes" livefreeordichotomize.com/20… #rstats
Use TRUE and FALSE to represent the boolean values. These are reserved words, unlike T and F which can be overwritten as variables.
1
8
3
34
Use colSums to quickly calculate totals from the columns of a large matrix or table: rdocumentation.org/packages/… #rstats
7
1
16
Type ?Syntax to learn the precedence of operators in the R language: rdocumentation.org/packages/… #rstats
5
13
What They Forgot to Teach You About R: e-book on the common sources of friction in data analysis with R, by @JennyBryan and @jimhester_ rstats.wtf/ #rstats
format(x, scientific=TRUE) prints numeric data in exponential format, so 0.0001 prints as 1e-04 rdocumentation.org/packages/… #rstats
9
19
Data Carpentry for Biologists: a self-guided 15-week course with videos and exercises in R datacarpentry.org/semester-b… #rstats
11
19
Guide to density estimation in R from Deng and Wickham vita.had.co.nz/papers/densit… #rstats
11
13
rle(x) ("run-length encoding") computes the lengths of runs of equal values in a vector rdocumentation.org/packages/… #rstats
5
10