Slightly related to this (I think Mr. Rydevik's code solved the question),
is a silly thing I wrote up one weekend. It started out as a clone of
the unix "rm -i" command, and kept on going out of control :-)
I'm not claiming this is clean, or the best way to do this, but it does
let you appl
Thanks Greg.
I did in the past looked into the details of how to create a package.
I did not seem too complicated, but it would be time consuming -- an
then when one thinks in creating a package (even for his own use) it
always a good idea to check for wrong inputs, to have all functions
well docu
If you want to keep the functions, why not move them to a different environment
so that they don't get deleted when you delete everything else (this will also
work better if you want to use these same functions in other R sessions).
The most comprehensive way to do this is to create a package wi
Thank you all for the prompt answer !!
It did solve my problem perfectly !
Rgds,
Paulo
On Mon, Feb 2, 2009 at 11:51 AM, Kenn Konstabel wrote:
> You can get a list of all functions in your workspace with
>
> ls()[sapply(ls(), function(x) is.function(get(x)))]
> # or ls()[sapply(sapply(ls(),
You can get a list of all functions in your workspace with
ls()[sapply(ls(), function(x) is.function(get(x)))]
# or ls()[sapply(sapply(ls(), get), is.function)]
Removing everything else is
rm(list=ls()[sapply(ls(), function(x) !is.function(get(x)))])
# or rm(list=ls()[!sapply(sapply(ls(), ge
On 02/02/2009 8:16 AM, Paulo Grahl wrote:
Dear list members,
Does anyone know how to use rm() to remove only variables but not
declared functions from the environment ?
I understand I could name all the functions with, let's say
"f_something", make sure that all variables do not start with "f_"
On Mon, Feb 2, 2009 at 2:16 PM, Paulo Grahl wrote:
> Dear list members,
>
> Does anyone know how to use rm() to remove only variables but not
> declared functions from the environment ?
> I understand I could name all the functions with, let's say
> "f_something", make sure that all variables do n
Paulo Grahl gmail.com> writes:
>
> Dear list members,
>
> Does anyone know how to use rm() to remove only variables but not
> declared functions from the environment ?
> I understand I could name all the functions with, let's say
> "f_something", make sure that all variables do not start with "
8 matches
Mail list logo