[Rd] R CMD install: problem quoting spaces when calling gzip?

From: jochen laubrock <jochen.laubrock_at_gmail.com>
Date: Fri, 26 Mar 2010 00:07:49 +0100

There appears to be a quoting problem in the way R CMD install handles file names containing spaces, more specifically, in the way the argument is passed through to gzip.

The install.packages command

(from R)

install.packages("~/Projects/R library/bar/eyetrackR_0.13.tar.gz", repos = NULL, type = "source")

expands to

system("R_LIBS='/Users/foo/Library/R/2.10/library' "/Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL -l '/Users/foo/Library/R/2.10/library' '/Users/foo/Projects/R\ library/bar/eyetrackR_0.13.tar.gz'")

and gives the same error messages as the following commands from Terminal.app on Mac OS X

(from bash)

R CMD install /Users/foo/Projects/R\ library/bar/eyetrackR_0.13.tar.gz
R CMD install "~/Projects/R library/bar/eyetrackR_0.13.tar.gz" R CMD install '~/Projects/R library/bar/eyetrackR_0.13.tar.gz'

, namely (the error messages):

gzip: /Users/foo/Projects/R.gz: No such file or directory gzip: library/bar/eyetrackR_0.13.tar.gz: No such file or directory

The following commands do work

(from R)

setwd("~/Projects/R library/bar/")
install.packages("eyetrackR_0.13.tar.gz", repos = NULL, type = "source")

(from bash)

cd ~/Projects/R\ library/bar/
R CMD install eyetrackR_0.13.tar.gz

Interestingly, if the file is unpacked on the command line (tar xzvf), then both R CMD install and install.packages work fine using the quoted path name syntax, i.e.,

R CMD install /Users/foo/Projects/R\ library/bar/eyetrackR install.packages("~/Projects/R library/bar/eyetrackR", repos = NULL, type = "source")

Is this a known problem? I searched the archives, but did not find a decisive answer (only some rather old posts suggesting not to use path names containing spaces--unfortunately this is not an option in the managed Windows environment I need to work in next week).

Sorry for the long post and thanks for your time, Jochen

Jochen Laubrock, Dept. of Psychology, University of Potsdam, Karl-Liebknecht-Strasse 24-25, 14476 Potsdam, Germany phone: +49-331-977-2346, fax: +49-331-977-2793

R-devel_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 25 Mar 2010 - 23:11:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 26 Mar 2010 - 10:11:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive