12.07.2015 Views

R dummies

R dummies

R dummies

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The hardest part of producing a minimal reproducible example is to keep itminimal. The challenge is to identify the smallest example (the fewest lines ofcode) that reproduces the problem or error.Before you submit your code, make sure to describe clearly which packagesyou use. In other words, remember to include the library() statements. Also,test your code in a new, empty R session to make sure it runs without error.People should be able to just copy and paste your data and your code in theconsole and get exactly the same results as you get.Providing the necessary informationIncluding a little bit of information about your R environment helps peopleanswer your questions. You should consider supplying the following:Your R version (for example, R 2.13-1)Your operating system (for example, Windows 7 64-bit)The function sessionInfo() prints information about your version of R andsome locale information, as well as attached or loaded packages. Sometimesthe output of this function can help you determine whether there are conflictsbetween your loaded packages. Here’s an example of the results ofsessionInfo():> sessionInfo()R version 2.14.1 (2011-12-22)Platform: x86_64-pc-mingw32/x64 (64-bit)locale:[1] LC_COLLATE=English_United Kingdom.1252[2] LC_CTYPE=English_United Kingdom.1252[3] LC_MONETARY=English_United Kingdom.1252[4] LC_NUMERIC=C[5] LC_TIME=English_United Kingdom.1252attached base packages:[1] stats graphics grDevices utils datasets[6] methods baseother attached packages:[1] rj_1.0.2-5 devtools_0.5.1loaded via a namespace (and not attached):

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!