[R-SIG-Mac]file.info and R can take a long time to quit

Greg Jefferis jefferis@stanford.edu
Sun, 21 Oct 2001 19:25:45 -0700


Dear Mac R users,

I had a couple of questions.  I am using R v1.3.1 on MacOS 9.1

1) file.info() gives wrong date

fname<-"veryunlikelyname.1234"
tfile<-file(fname,"w")
cat("abdc",file=tfile)
close(tfile)
file.info(fname)

...  # wait a few seconds

tfile<-file(fname,"w")
cat("abdc",file=tfile,append=T)
close(tfile)
file.info(fname)
unlink(fname)

Gives:
> file.info(fname)  # the first time:
                     size isdir mode               mtime
veryunlikelyname.1234    4 FALSE      1997-09-16 12:50:54
                                    ctime
veryunlikelyname.1234 1997-09-16 12:50:54
                                    atime

> file.info(fname)  # the second time:

                      size isdir mode               mtime
veryunlikelyname.1234    4 FALSE      1997-09-16 12:51:12
                                    ctime
veryunlikelyname.1234 1997-09-16 12:50:54
                                    atime
veryunlikelyname.1234 1997-09-16 12:51:12

so these dates are changing, although they are 4 years early (I think the
mac date starts from 1904 now that I think about it). Is there any way to
get the correct creation/modification date of a file? date() does work, so
perhaps the routine already exists.

2)
The second thing is a very minor annoyance which puzzles me.  If I start a
new R session and type
>sapply(1:1000,print(letters))
... loads of output
>q()
Save workspace image? [y/n/c]: n

i.e. don't save it takes 5min and 30 seconds to quit.  My machine is running
a 400MHz G4.  I have given R a preferred memory allowance of 75000kb.  If it
isn't saving, what's it doing for those 5 mins?  When I'm writing code, I
tend just paste it into the R console from Alpha and consequently after a
long session the console history can get pretty large.

Many thanks for any insights,

Greg.

__________________________________________________________________________
Greg Jefferis,                          Lab Address: Liqun Luo, Herrin 144
Neurosciences PhD Programme &                e-mail: jefferis@stanford.edu
Dept Biological Sciences,                       Lab: (650) 725 5809
Gilbert Biology Building,                       Fax: (650) 723 0589
371 Serra Mall,
Stanford, CA 94305-5020.                       Home: (650) 497 1135