Skip to content
Prev 68665 / 398506 Next

Data() and CSV files

"McGehee, Robert" <Robert.McGehee at geodecapital.com> writes:
Semicolon-separated CSV's are common in various parts of Europe, but
usually coincident with comma as decimal separator (cf.
read.csv/read.csv2). I can't remember whether there was a reason for
the choice in data().
One trick is that .R files are processed before other files, so a mydata.R
file containing  mydata <- read.csv("mydata.csv") should do the trick.

It messes with lazy loading of data sets though.

An alternative is to preprocess the data set to (say) .Rda format.