[R] How to import data from a text file in R

Jim Holtman jholtman at gmail.com
Sun Nov 25 13:33:23 CET 2012


read the 'intro to R' again and then

?scan
?read.table

Sent from my iPad

On Nov 25, 2012, at 6:29, dilo88 <claudio.diloreto at carloalberto.org> wrote:

> Hi,
> 
> I'd like to import a 154x1 vector of a stock monthly returns from a text (or
> excel spreadsheet) into R. I need to work on this vector by calculating
> mean, variance and use it for more complex operations. What is the best
> function to do so? There are no headers, just 154 decimale numbers (so there
> also negative numbers).
> 
> Thanks,
> 
> Claudio
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-import-data-from-a-text-file-in-R-tp4650718.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list