Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.GSO.4.10.10212250930270.27563-100000@quetelet.stat.ucla.edu>
Date: 2002-12-25T18:35:03Z
From: Roger D. Peng
Subject: Is there string class in R?
In-Reply-To: <se098260.003@mailx.chmcc.org>

See the paste() function.

for(i in 1:N) {
  filename  <-  paste("***", i, ".PRN", sep = "")
  scan(filename)
  ...
}

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng

On Wed, 25 Dec 2002, Zhongming Yang wrote:

> Hi,
> 
> I want to use R handle hundreds data file. So I want use some string
> class to handle the names of data file. 
> 
> My idea procedure like:
> 
> for i in 1:20
> {
>    filename = "***" + i +".PRN"
>    scan(filename)
>    ....
> }
> 
> Do anyone know how to do this?
> 
> Thanks,
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>