Test if requested solver is present.
checksolver(method, allmeth, allpkg) checkallsolvers()
Character string giving the name of the solver requested.
Character vector giving the names of the methods optimr can use.
Character vector giving the names of the packages where solvers are found.
If the solver defined by character string in
checksolver returns this string, else NULL.
checkallsolvers() returns a vector of strings that are the
names of missing solvers, else NULL if all solvers specified in
are present where
allmeth is returned from a call to
n is some integer.
allmeth <- c("Rvmmin", "nlminb","ipopttest") allpkg <- c("Rvmmin", "stats","ipoptr") print(checksolver("nlminb", allmeth, allpkg)) # If Rvmmin NOT available, get msg that PACKAGE not available. print(checksolver("Rvmmin", allmeth, allpkg)) # Get message that SOLVER not found print(checksolver("notasolver", allmeth, allpkg))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.