From Kurt.Hornik at wu-wien.ac.at  Mon Mar  5 12:27:36 2007
From: Kurt.Hornik at wu-wien.ac.at (Kurt Hornik)
Date: Mon, 5 Mar 2007 12:27:36 +0100
Subject: [Rd] fortune() in .Rprofile conflicts with R CMD INSTALL
In-Reply-To: <loom.20070304T230316-753@post.gmane.org>
References: <45EAB839.9090203@bfro.uni-lj.si> <m2tzx19e3l.fsf@ziti.local>
	<loom.20070304T230316-753@post.gmane.org>
Message-ID: <17899.65192.532067.867254@mithrandir.hornik.net>

>>>>> Gregor Gorjanc writes:

> Seth Falcon <sfalcon <at> fhcrc.org> writes:
>> The quick fix for you is, I believe,
>> 
>> if (interactive()) {
>> library(fortunes)
>> fortune()
>> detach("package:fortunes")
>> }
>> 
>> Whether something could be changed so that R's output doesn't confuse
>> itself and gcc when doing R CMD INSTALL, seems like it should be
>> possible.

> Yes, this solves my! problem. I do not know what is causing this
> behaviour.

Well, r-devel's src/scripts/INSTALL.in now has

if test -z "${lib}"; then
  lib=`echo "cat(.libPaths()[1])" | \
    R_DEFAULT_PACKAGES=NULL "${R_EXE}" --no-save --slave`
  message "Installing to library '$lib'"

so we need to find a way to "just get" the result of cat(.libPaths()[1])
into $lib as intended.

One idea might be ensuring that this gets into the last line on its own,
and then taking $lib as the last line of what we got ...

Best
-k

> This did not happen with 2.4.1

> Thank you Seth.

> Gregor

> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] fortune() in .Rprofile conflicts with R CMD INSTALL
Kurt Hornik