From murdoch.duncan at gmail.com  Mon Nov 28 21:04:41 2011
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Mon, 28 Nov 2011 15:04:41 -0500
Subject: [Rd] R CMD <custom>?
In-Reply-To: <CAFDcVCSuR6159QO=0J8Xe9icY9AOLDnSUvMF=w7=r5+jaL=uZg@mail.gmail.com>
References: <CAFDcVCSuR6159QO=0J8Xe9icY9AOLDnSUvMF=w7=r5+jaL=uZg@mail.gmail.com>
Message-ID: <4ED3E959.3020806@gmail.com>

On 28/11/2011 2:16 PM, Henrik Bengtsson wrote:
> Hi,
>
> is it possible to add a custom script such that it is called via R CMD
> <custom>?  Is R CMD searching for it elsewhere than R_HOME/bin/?  I'm
> looking for an non-admin alternative, so copying the script to
> R_HOME/bin/ will not do (in case the user don't have enough permission
> to write there).

I don't remember if this is platform independent,  but

R CMD foo

on Windows will set up standard environment variables then try to 
execute "foo".  If "foo" isn't one of the internal commands listed by

R CMD --help

then it will just go looking for it like any other command in the path.  
(This is why "R CMD install" gives a funny error message:  the internal 
command is "INSTALL", so "R CMD install" just tries to execute "install".)

Duncan Murdoch



[Rd] R CMD <custom>?
Duncan Murdoch