Note that there are some explanatory texts on larger screens.

plurals
  1. POI want to have a list of all the functions in my R workspace that works like the objects() command
    primarykey
    data
    text
    <p>I love working with R functions, so my workspace accumulates a lot of functions.</p> <p>However, the "objects()" command seems to return strings that name my objects instead of the objects themselves. So when I have a function named "barchart00", it shows up with the objects() command, and if I test its type, it is detectable as a function, as the following code shows:</p> <blockquote> <p>is.function(barchart00) [1] TRUE</p> </blockquote> <pre><code>&gt; objects() [1] "barchart00" &gt; OL&lt;-objects() &gt; OL [1] "barchart00" &gt; is.function(OL[1]) [1] FALSE </code></pre> <p>This wouldn't be a problem if I had just one or two or three functions. But in practice I have dozens of functions, AND dozens of objects that are not functions, and I want to get a list of functions that's just as convenient as the list of objects returned by objects().</p> <p>My first thought was that if objects() returned a list of actual objects, I could just go through that list and test for function status. But in fact, objects() seems to return a list of strings that are the names of my objects, not the objects themselves.</p> <p>Any constructive advice would be greatly appreciated. Thanks.</p> <p>...Hong Ooi answered the question but I can't mark it as answered for another eight hours.</p> <p>lsf.str() is the syntax I was looking for.</p> <p>All credit should go to Hong Ooi. </p> <p><a href="https://stackoverflow.com/users/474349/hong-ooi">https://stackoverflow.com/users/474349/hong-ooi</a></p> <p>Thanks, Hong Ooi.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload