Reputation: 3151
I am trying to learn how to do math in R. I found the following website but it does not specify which package certain functions are bundled in.
For example, I am trying to run the example on Taylor Series. On the website, it gives a code snippet near the bottom of the page:
taylor(sin, 0, 4)
I am getting the following output:
Error in taylor(sin, 0, 4) : could not find function "taylor"
Then, I wanted to check what the official documentation says about the function, so I entered
?taylor
and got the following:
No documentation for ‘taylor’ in specified packages and libraries:
So, experienced users of R, is https://www.rdocumentation.org reputable? If you use it, how can you find which package you need to install in order to use certain functions?
Upvotes: 0
Views: 108
Reputation: 8262
There is an R package called sos
that can help you search rapidly through packages for a keyword. You can try running the following code and see that it outputs a single match, the pracma
package that others have mentioned here.
install.packages("sos")
library(sos)
findFn("taylor(sin, 0, 4)")
Upvotes: 1
Reputation: 9613
In the url itself: https://www.rdocumentation.org/packages/pracma/versions/1.9.9/topics/taylor
The page itself also specified the package from which that function originate.
In any case you’ll see that it is from the pracma package. Hope that’s helpful!
Upvotes: 1