I want to use computeEstimate()
function. But since the specific package is not installed in my R, I am getting error:
could not find function "computeEstimate"
Can you please let me know which package I should install to get this function? Also - how do I find a package for a specific function in R?
We can find the functions inside a package by using lsf. str function but we need to load the package prior to knowing the functions inside.
Every time you start a new R session you'll need to load the packages/libraries that contain functions you want to use, using either library() or require() . If you load a package with the same function name as in another package, you can use packageName::functionName() to call the function directly.
The pipe operator, written as %>% , has been a longstanding feature of the magrittr package for R. It takes the output of one function and passes it into another function as an argument.
View the list of installed packages. Note that, in RStudio, the list of installed packages are available in the lower right window under Packages tab (see the image below).
Install the package sos first, then:
require("sos")
findFn("computeEstimate")
This function searches the help pages of packages covered by the RSiteSearch archives (which includes all packages on CRAN).
Although for your example, it did not find a package.
But for example
findFn('multiply',maxPages = 1)
works fine. Are you sure the function exists somewhere?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With