From h.wickham at gmail.com  Wed Jan 16 21:39:46 2013
From: h.wickham at gmail.com (Hadley Wickham)
Date: Wed, 16 Jan 2013 14:39:46 -0600
Subject: [Rd] Trouble building package using R in development
In-Reply-To: <CAFDcVCQmyZYLpT=vkFaT5feJSS4VcSBKR+VoNAtosVKXBhzU_A@mail.gmail.com>
References: <1358348706.4687.25.camel@chrysothemis.geog.ucl.ac.uk>
	<1358349920.4687.34.camel@chrysothemis.geog.ucl.ac.uk>
	<CAFDcVCQmyZYLpT=vkFaT5feJSS4VcSBKR+VoNAtosVKXBhzU_A@mail.gmail.com>
Message-ID: <CABdHhvH8rMf+7_1vSXErW142vR=xctwXw6YyO6m0QyADxt-=nQ@mail.gmail.com>

> To circumvent this, I check using:
>
> R --no-init-file CMD check foo_1.0.tar.gz

In devtools, we take considerable care to match the R you're running
with the R you're checking in, so we also set the following
environmental variables:

env <- c(
    "LC_ALL" = "C",
    "R_LIBS" = paste(.libPaths(), collapse = .Platform$path.sep),
    "CYGWIN" = "nodosfilewarning",
    "R_TESTS" = "",
    "NOT_CRAN" = "true",
    "TAR" = auto_tar(),
)

and always run /path/to/current/R --vanilla CMD check ...

Hadley

-- 
Chief Scientist, RStudio
http://had.co.nz/



[Rd] Trouble building package using R in development
Hadley Wickham