[R] Mac OS 9 and file type/creator

Jan de Leeuw deleeuw at stat.ucla.edu
Wed Oct 30 23:04:29 CET 2002


Macintosh files (in OS 9 and before) basically have three forks: a data  
fork, a resource
fork, and a finder information fork. The finder information has the  
type and a creator
specification, in the case of a pdf file these are PDF /CARO. This  
information
tells the finder which application to open the file with, which icon to  
show,
and so on. There is room for 10^8 vendors, and each of these vendors can
create 10^8 types of files. PDF /CARO get the Adobe icons, etc. The  
files that
R creates are basically  flat files, with a single fork, in which there  
is no room
for finder information.

Although many people deplore this, OS X writes flat files as well and  
derives
type/creator information from the name of the file. So foo.pdf is known  
to be
a pdf file and the finder knows that pdf files must be opened with  
AcroRead
or Preview or whatever you set in your preferences. This is the  
classical
MIME-type scheme, less flexible, more simple.

Since both R and the Mac OS will pretty soon be completely OS X
dominated, I don't think it is really worthwhile to build in legacy OS 9
characteristics which actually hinder portability.


On Wednesday, October 30, 2002, at 10:03 AM, <ripley at stats.ox.ac.uk>  
wrote:

> On Wed, 30 Oct 2002, David Orme wrote:
>
>> I'm using R1.5.0 on Mac OS 9.1 to create graphics as pdf files. One
>> problem, admittedly pretty minor, is that the file type and creator
>> are blank. Is there any way from within R of setting the file type
>> and/or file creator of the resulting files so that OS9 can work out
>> which program to open the files in?
>
> I don't see file type as a field in the PDF spec, and also don't see
> how a field in a file can help tell you which program to open it with,
> when it is already open by then ....
>
> The creator field could be filed in as R, I guess, but it won't help  
> you.
> It's purely for information.
>
> I think your OS has not got its MIME types sorted.
>
> --  
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 
> .-.-.-.-.-
> r-help mailing list -- Read  
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To:  
> r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ 
> ._._._._
>
>
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw at stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
   
------------------------------------------------------------------------ 
-------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list