This is a quick update post following up my data import post. I have put a script file into the
/funs/ directory of my blog project that repeats the import and saving stuff I stepped through in that last post. You can find it on Github here. Feel free to fork that repository, but if you don’t want to deal with all the git and version control stuff you can just click the Download Zip button on the right to get all the files as a zip archive. The
data_import.R script can be sourced via RStudio or an R command prompt, and will reproduce the
contrast_data.RData file in the
/out/ directory. For this to work, your working directory needs to be set to the project’s root directory; the easiest way to do this is by setting up a Project in RStudio located in the root directory. When you open your R project in RStudio, the working directory will automatically be set to the root.
I also wanted to point you to this article on using the “good parts” of R. It’s certainly true that some of R’s base syntax and functions are kind of horrible; using those add-on packages is really helpful. I learned some new things there too – like the use of