Hello,

For reasons I don't understand, data() imports CSV (Comma-Separated
Values) as if they were delimited by semicolons instead of commas. (Are
semicolon-separated Comma-Separated-Value files common somewhere?) Given
that this is the case, if I choose to put comma-delimited CSV files in
my data directory, what is the preferred method of loading these into
memory?

data("filename")
would be nice, but not applicable given the above conversion issue.

So, this was the best I came up with:

read.csv(file.path(.find.package("pkg"), "data", paste("filename",
"csv", sep = ".")))

However, given that others undoubtedly like to include (non-semicolon)
.csv files in their packages and load them easily, I would like to know
if there is a more elegant way to load these files. Perhaps an
annotation in the data/00Index or /data/datalist file that I am unaware
of?

Thanks,
Robert

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to