View Full Version : mgvc package in R
I'm interested in using the mgvc package in Program R. Can anyone tell me how to upload my data if it's in .csv format?
vinux
07-30-2008, 10:45 PM
I'm interested in using the mgvc package in Program R. Can anyone tell me how to upload my data if it's in .csv format?
Use the read.csv() function
For more detailed information see the link below.
http://cran.r-project.org/doc/manuals/R-data.html
Regards
RIch
TheEcologist
07-31-2008, 03:52 AM
I'm interested in using the mgvc package in Program R. Can anyone tell me how to upload my data if it's in .csv format?
[I'm assuming you use windows]
Most people I know who don’t have some sort of programming background despise R because they have difficultly reading files.
A simple trick that often changes their minds & makes life easier with reading files in R is:
(the following depends on if you're in Europe or the States)
read.csv(file.choose()) #countries that use a comma
read.csv2(file.choose()) #countries that use a semicolon
The file.choose() command opens a window based navigator, you can use it to save data files as well.
write.csv(object,file.choose())
a second trick would be to copy the data you need into the clipboard and type this:
read.table(‘clipboard’)
good luck and have fun,
Thank You TheEcologist.
This is very useful trick. I didn't know it.
I'm writing scripts for people who don't know R. and This would simplify things a lot for me.
Thank you again.
TheEcologist
07-31-2008, 01:42 PM
Thank You TheEcologist.
This is very useful trick. I didn't know it.
I'm writing scripts for people who don't know R. and This would simplify things a lot for me.
Thank you again.
Yeah, no problem anytime. :tup:
Maybe we should start a "Helpfull R-tricks" thread one of these days...
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.