Define all functions in one .R file, call them from another .R file. How, if possible?
How do I call functions defined in abc.R file in another file, say xyz.R?A supplementary question is, how do I call functions defined in abc.R from the R prompt/command line?
Change value of variable with dplyr?
I regularly need to change the values of a variable based on the values on a different variable, like this: mtcars$mpg[mtcars$cyl == 4] <- NAI tried doing this with `dplyr` but failed... more
YAML current date in rmarkdown?
I'm wondering if there's a trick to put the current date in the YAML front-matter of a `.rmd` document to be processed by `knitr` and the `rmarkdown` package. I would like to take advantage of the... more
Read an Excel file directly from a R script?
How can I read an Excel file directly into R? Or should I first export the data to a text- or CSV file and import that file into R?