One R Tip a Day

@RLangTip

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

Joined May 2011

Tweets

You blocked @RLangTip

Are you sure you want to view these Tweets? Viewing Tweets won't unblock @RLangTip

  1. 3 hours ago

    Reasons you should use the "here" package to make your R code portable:

    Undo
  2. Dec 2

    Introduction to the caret package: select, train and optimize predictive models:

    Undo
  3. Nov 29
    Undo
  4. Nov 28

    library(cowsay) say("Happy Thanksgiving!", by="turkey")

    Undo
  5. Nov 27
    Undo
  6. Nov 26

    The R Graphics Cookbook by , now available free online

    Undo
  7. Nov 25

    Convert character strings to their all-lower-case equivalents with tolower

    Undo
  8. Nov 22

    If two packages define functions with the same name, use :: to call the one you want:

    Undo
  9. Nov 21

    Use is.atomic(v) NOT is.vector(v) to test if vector. Try v=9; attr(v,"A") = "attr" See Wickham, Advanced R

    Undo
  10. Nov 20
    Undo
  11. Nov 19

    round(x, -2) rounds x to the nearest hundred

    Undo
  12. Nov 18

    Convenience features of the fread function in the data.table package for reading small and large data sets into R

    Undo
  13. Nov 15

    When selecting from vectors, repeated indexes are allowed. x[c(1,1,2,2,3,3)] duplicates the first 3 elements of x

    Undo
  14. Nov 14

    options(stringsAsFactors=FALSE) forces R to import character data as character objects, but avoid the temptation to add it to your .Rprofile file: your code may not work for others if you do

    Undo
  15. Nov 13
    Undo
  16. Nov 12

    Reasons why R is the best language for innovation, from the head of Data Science at Urban Institute:

    Undo
  17. Nov 11
    Undo
  18. Nov 7

    Explore the capabilities of your installed R packages with browseVignettes()

    Undo
  19. Nov 6
    Undo
  20. Nov 5

    The Plain Person’s Guide to Plain Text Social Science by

    Undo

Loading seems to be taking a while.

Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

    You may also like

    ·