[R] input data file

Tiandao Li Tiandao.Li at usm.edu
Wed Aug 8 04:24:38 CEST 2007


In the first part of myfile.R, I used scan() 100 times to read data from 
100 different tab-delimited files. I want to save this part to another 
data file, so I won't accidently make mistakes, and I want to re-use/input 
it like infile statement in SAS or \input(file.tex} in latex. Don't want 
to copy/paste 100 scan() every time I need to read the same data.

Thanks!

On Tue, 7 Aug 2007, jim holtman wrote:

If you are going to read it back into R, then use 'save'; if it is
input to another applicaiton, consider 'write.csv'.  I assume that
when you say "save all my data files" you really mean "save all my R
objects".

On 8/7/07, Tiandao Li <Tiandao.Li at usm.edu> wrote:
> Hello,
>
> I am new to R. I used scan() to read data from tab-delimited files. I want
> to save all my data files (multiple scan()) in another file, and use it
> like infile statement in SAS or \input{tex.file} in latex.
>
> Thanks!
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>


-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?



More information about the R-help mailing list