I need a way to determine the description of an argument within R.
For example, if I'm using the function qplot() from the package ggplot2, I need to be able to extract a description of each argument in qplot(). From ggplot2's reference manual, it's easy to see that there are several arguments to consider. One of them is called "data", which is described as: "data frame to use (optional). If not specified, will create one, extracting vectors from the current environment."
Is there a way to get this information from within an R session, rather than by reading a reference manual? Maybe an R function similar to packageDescription(), but for a function's arguments?
Thanks!
edit: I found a variant on my question answered here:
How to access the help/documentation .rd source files in R?
Reading the .Rd files seems like the safest way to get the information I need. For anyone interested, the following code returns a list of arguments and their descriptions, where "package_name" can be any package you want:
db <- Rd_db("package_name")
lapply(db, tools:::.Rd_get_metadata, "arguments")
Thank you for your help, everyone.