Loading aliased file in MacOSX

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Loading aliased file in MacOSX

R help mailing list-2
If I try to load data from an alias file made using Cmd+Ctrl+A in finder
for MacOSX, I get an error. Symbolic links are working well but
sometimes, it is easier to use finder rather than terminal.

Has someone a solution to help R to read the original aliased file ?


Here is a reproducible example:

A <- 10
save(A, file="A.Rdata")

# Make hard link
system(paste("ln A.Rdata B.Rdata"))
# It works


# Make symbolic link
system(paste("ln -s A.Rdata C.Rdata"))
# It works


# Make an alias of the A.Rdata file in finder using Cmd+Ctrl+A; the name
of the new file is "A.Rdata alias"
load(file="A.Rdata alias")

It failed with this error:

Error in load(file = "A.Rdata alias") :
 ?? mauvais num??ro magique de restauration de fichier (le fichier est
peut ??tre corrompu) -- aucune donn??e charg??e
De plus : Warning message:
 ?? file ???A.Rdata alias??? has magic number 'book'
Use of save versions prior to 2 is deprecated

[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.