On Tue, 6 Oct 2020 15:00:59 +0000 "Sorkin, John" <jsor...@som.umaryland.edu> wrote:
> Colleagues, > I am trying to learn to use uniroot to solve a simple linear > equation. I define the function, prove the function and a call to the > function works. When I try to use uniroot to solve the equation I get > an error message, Error in yfu n(x,10,20) : object 'x' not found. > > I hope someone can tell we how I can fix the problem > > if(!require(rootSolve)){install.packages("rootSolve")} > library(rootSolve) Others have told you how to solve your problem. I am curious to know why on earth you are loading the rootSolve package. The uniroot() function is in package "stats" which is automatically available. <SNIP> cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.