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 ?

Thanks

Here is a reproducible example:

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

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

rm(A)

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

rm(A)

# 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

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to