All,
Is there are a wildcard in R for varible names as in unix? For example,
rm(results*)
to remove all variable or function names that begin w/ results?
cheers,
Dave
ps - please respond directly to [EMAIL PROTECTED]
On Mon, 2005-10-10 at 10:37 -0400, Afshartous, David wrote:
All,
Is there are a wildcard in R for varible names as in unix? For example,
rm(results*)
to remove all variable or function names that begin w/ results?
cheers,
Dave
ps - please
rm() can take a list of object names as an argument and ls(pattern='^results')
gives such a list. So
rm(ls(pattern='^results'))
would remove all objects that are matched by the regular expression, that is all
that begin with 'results'
HTH, Johan
2005/10/10, Marc Schwartz (via MN) [EMAIL
On 10/10/05, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote:
On Mon, 2005-10-10 at 10:37 -0400, Afshartous, David wrote:
All,
Is there are a wildcard in R for varible names as in unix? For
example,
rm(results*)
to remove all variable or function names
On Mon, 10 Oct 2005, Marc Schwartz (via MN) wrote:
On Mon, 2005-10-10 at 10:37 -0400, Afshartous, David wrote:
All,
Is there are a wildcard in R for varible names as in unix? For example,
rm(results*)
to remove all variable or function names that begin w/ results?
In R 2.2.0, there is the function 'glob2rx()' which can be used for this
purpose. As in
rm(list = ls(pattern = glob2rx(results*)))
-roger
Afshartous, David wrote:
All,
Is there are a wildcard in R for varible names as in unix? For example,
rm(results*)
to
On Mon, 2005-10-10 at 16:01 +0100, Prof Brian Ripley wrote:
On Mon, 10 Oct 2005, Marc Schwartz (via MN) wrote:
On Mon, 2005-10-10 at 10:37 -0400, Afshartous, David wrote:
All,
Is there are a wildcard in R for varible names as in unix? For example,
rm(results*)
to