Skip to content
Prev 302127 / 398502 Next

How to link two R packages together

Hi Michael,
Thank you so much for the help Michael! When I put my package 'PKG2' (on which PKG1 is depending on) in the regular place, perhaps a place R CMD check won't look at, then when I try to build PKG1, they will say PKG2 required but not found, so I have to put it under a directory R looks at, just the paths under '.libPaths()'. 
I read through the manual (the 7th section entitled "tools"of "R internals"), and they suggest changing check.Environ under ~/.R, so I have tried to put check.Environ "~/.R", "~/" is my home directory which is just the path shown after typing cd &&pwd. But It doesn't work, so I thought "~/" might be something else.
Thank you so much for the help, I really appreciate that!
Yours,
Xuan

-----Original Message-----
From: R. Michael Weylandt [mailto:michael.weylandt at gmail.com] 
Sent: Thursday, August 02, 2012 10:46 AM
To: Xuan Zhao
Cc: r-help at r-project.org
Subject: Re: [R] How to link two R packages together
On Thu, Aug 2, 2012 at 9:02 AM, Xuan Zhao <xuan.zhao at sentrana.com> wrote:
By which you mean .... ?
"~" is a standard UNIX (POSIX?) shorthand for the user's home directory. On my Mac it is "/Users/mweylandt" and I imagine you'd get something similar on all Linux and BSD systems -- one easy way to see where it is: go to your terminal and type "cd && pwd" which will print it out. No idea what the parallel on Windows is: possibly something under C:/Documents and Settings but it's been so long since I've had the misfortune of doing serious work on Windows, I can't remember.

Incidentally, is there a reason you can't put your package in the "regular" place?

Finally, see the manuals that Bert, Josh, and I have pointed you to:
they are much more authoritative on these matters than any of us.

Best,
Michael