Interactive library content in R

Is there an equivalent dir function (python) in R?

When I load a library in R, for example -

Library (vrtest)

I want to know all the functions that are in this library.

In Python, dir (vrtest) will be a list of all vrtest attributes.

I assume that in general, I am looking for a better way to get R help when running in ESS on Linux. I see all of these manual pages for packages that I installed, but I'm not sure how I can access them.

thanks

+6
r statistics data-analysis ess
source share
3 answers

help(package = packagename) display all non-internal functions in the package.

+6
source share

Yes, use ls() .

You can use search () to find out what is in the search path:

 > search() [1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7] "package:methods" "Autoloads" "package:base" 

You can find a specific package with the full name:

  > ls("package:graphics") [1] "abline" "arrows" "assocplot" "axis" .... 

I also suggest fooobar.com/questions/196948 / ... , which includes an even more creative approach to viewing the environment. If you use ESS, you can use Ess-rdired.

To get help pages for a specific topic, you can use help(function.name) or ?function.name . You will also find the help.search() function useful if you do not know the exact name or package of the function. Finally, check out the sos package .

+7
source share
 help(topic) #for documentation on a topic ?topic summary(mydata) #an overview of data objects try ls() # lists all objects in the local namespace str(object) # structure of an object ls.str() # structure of each object returned by ls() apropos("mytopic") # string search of the documentation 

All of the R-Reference Card

0
source share

All Articles