Find the day of a week

Let’s say that I have a date in R and it’s formatted as follows. date 2012-02-01 2012-02-01 2012-02-02 Is there any way in R to add another column with the day of the week associated with the date? The dataset is really large, so it would not make sense to go through manually and make … Read more

Change R default library path using .libPaths in Rprofile.site fails to work

I am running R on Windows, not as an administrator. When I install a package, the following command doesn’t work: > install.packages(“zoo”) Installing package(s) into ‘C:/Program Files/R/R-2.15.2/library’ (as ‘lib’ is unspecified) Warning in install.packages : ‘lib = “C:/Program Files/R/R-2.15.2/library”‘ is not writable To install a package, I have to specify a library location: install.packages(“zoo”, lib=”C:/software/Rpackages”) … Read more