Skip to content
Back to formatted view

Raw Message

Message-ID: <24CC6971-3F09-4BB1-A163-4B0C0B427E24@gmail.com>
Date: 2012-05-25T06:45:01Z
From: Peter Dalgaard
Subject: How to open a file with a name changed?
In-Reply-To: <4FBED483.7030707@xtra.co.nz>

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