Hi Loren,
Try the following. You need to have XCode developer tools installed. Assumes
that you working directory is where the files of interest are. Otherwise add a
path to the ls command.
files <- system("ls",intern=T)
date <- vector(mode="character",length=length(files))
names(date) <- files
for (f in files) {
date[f] <- system(paste("/Developer/Tools/GetFileInfo -d
'",f,"'",sep=""), intern=T)
}
Message: 1
Date: Tue, 28 Oct 2008 16:03:35 -0700
From: Loren Engrav <[EMAIL PROTECTED]>
Subject: Re: [R-SIG-Mac] File creation date
To: "[email protected]" <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="US-ASCII"
Sorry my email was unclear
I am looking at files within a saved R workspace
The date of the workspace file is 3/18/2007 but I don't think all of the
files were created on that date as I think I used the workspace over some
period of time
So I would like the creation date of the files WITHIN the workspace
Maybe I should be asking this on the R email list
From: Steve Lianoglou <[EMAIL PROTECTED]>
Date: Tue, 28 Oct 2008 18:48:34 -0400
To: Loren Engrav <[EMAIL PROTECTED]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [R-SIG-Mac] File creation date
Hi,
On Oct 28, 2008, at 6:00 PM, Loren Engrav wrote:
Ok, I give up
I am exploring some workspace files created long long ago
And need the creation date of some of the files
I try ls() but cannot see the parameters to show creation date
I try file.info and get NA
How do I get creation date to show
One way is to navigate to the file via the Finder, select it, and hit
Cmd-I (File > Get Info)
You'll find what you're looking for in the "General" section.
HTH,
-steve
--
Steve Lianoglou
Graduate Student: Physiology, Biophysics and Systems Biology
Weill Medical College of Cornell University
http://cbio.mskcc.org/~lianos
--
Julin Maloof
Assistant Professor
Section of Plant Biology
University of California, Davis
1 Shields Ave
Davis, CA, 95616
voice: (530) 752-8077
fax: (530) 752-5410
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac