[R] How to open a file with a name changed?

peter dalgaard pdalgd at gmail.com
Fri May 25 08:45:01 CEST 2012


On May 25, 2012, at 02:38 , Rolf Turner wrote:

> ?paste

or ?sprintf, which might lead to more readable code. Also

> format(today, "C:/Bonos/%Y%m%d.csv")
[1] "C:/Bonos/20120525.csv"



> On 25/05/12 11:45, Minerva Mora wrote:
>> Hi, I apologize for my english.
>> 
>> I´m trying to read a file, but the name of this file changes every day, for
>> example: today is May 24, 2012
>> 
>> bonos<- read.table("C:/Bonos/*20120524*.csv", header=TRUE, sep="\t")
>> 
>> So, tomorrow I want to read the file again, but i don´t want to put the date
>> by myself, i want this automatically. I know that if a put day() this
>> instruccion gives me the date.
....

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list