I've noticed recently that 'update.packages' and 'install.packages' seem to not
do tilde expansion anymore, i.e. when I run
update.packages("~/R-local/lib")
on R-alpha (r41043) I get the message
/home/rpeng/install/R-alpha/lib64/R/bin/INSTALL: line 304: cd: ~/R-local/lib: No
such file or directory
and the package is subsequently installed in the current working directory.
The attached patch solves the problem for me.
-roger
--
Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/
Index: src/scripts/INSTALL.in
===================================================================
--- src/scripts/INSTALL.in (revision 41043)
+++ src/scripts/INSTALL.in (working copy)
@@ -294,6 +294,7 @@
shift
done
+lib=`tilde_expand "${lib}"`
if test -z "${lib}"; then
lib=`echo "cat('~~~', .libPaths()[1], sep = '')" | \
R_DEFAULT_PACKAGES=NULL "${R_EXE}" --no-save --slave | \
@@ -332,7 +333,6 @@
exit 1
fi
-lib=`tilde_expand "${lib}"`
if (test -d "${lib}" && test -w "${lib}") || \
${MKDIR_P} "${lib}" 2> /dev/null; then
lib=`cd "${lib}" && ${GETWD}`
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel