Hi, I tried with library(MASS) methods('boxcox') # [1] boxcox.default* boxcox.formula* boxcox.lm* Then> boxcox.lmError: object 'boxcox.lm' not found How to look into the codes of boxcox.lm? Thanks for your time [[alternative HTML version deleted]]
MASS:::boxcox.lm (three :) which will lead you quickly to MASS:::boxcox.default where the real work gets done. cheers Ben Bolker On 1/23/25 13:22, Daniel Lobo wrote:> Hi, > > I tried with > > library(MASS) > methods('boxcox') > # [1] boxcox.default* boxcox.formula* boxcox.lm* > > Then > >> boxcox.lm > > Error: object 'boxcox.lm' not found > > How to look into the codes of boxcox.lm? > > Thanks for your time > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
See ?"::" Many packages hide some of their internal objects, because they are not meant to be directly called by users. As the Help file referenced above explains, they can be referenced by the triple colon operatorm in this case: MASS:::boxcox.lm See also ?methods and methods(boxplot) for further info about how to see and access available methods. This is all part of R's so-called S3 methods system, for which you should probably consult an online tutorial if you want to use R to any significant extent. -- Bert On Thu, Jan 23, 2025 at 10:23?AM Daniel Lobo <danielobo9976 at gmail.com> wrote:> Hi, > > I tried with > > library(MASS) > methods('boxcox') > # [1] boxcox.default* boxcox.formula* boxcox.lm* > > Then > > > boxcox.lm > > Error: object 'boxcox.lm' not found > > How to look into the codes of boxcox.lm? > > Thanks for your time > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
?s 18:22 de 23/01/2025, Daniel Lobo escreveu:> Hi, > > I tried with > > library(MASS) > methods('boxcox') > # [1] boxcox.default* boxcox.formula* boxcox.lm* > > Then > >> boxcox.lm > > Error: object 'boxcox.lm' not found > > How to look into the codes of boxcox.lm? > > Thanks for your time > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.Hello, In such cases, try ?getAnywhere. library(MASS) getAnywhere("boxcox.lm") #> A single object matching 'boxcox.lm' was found #> It was found in the following places #> registered S3 method for boxcox from namespace MASS #> namespace:MASS #> with value #> #> function (object, lambda = seq(-2, 2, 1/10), plotit = TRUE, interp = (plotit && #> (m < 100)), eps = 1/50, xlab = expression(lambda), ylab = "log-Likelihood", #> ...) #> { #> m <- length(lambda) #> if (is.null(object$y) || is.null(object$qr)) #> object <- update(object, y = TRUE, qr = TRUE, ...) #> result <- NextMethod() #> if (plotit) #> invisible(result) #> else result #> } #> <bytecode: 0x00000220c9e6f9d0> #> <environment: namespace:MASS> ?NextMethod tells you to look in the default method. boxcox.default #> Error: object 'boxcox.default' not found getAnywhere("boxcox.default") Hope this helps, Rui Barradas -- Este e-mail foi analisado pelo software antiv?rus AVG para verificar a presen?a de v?rus. www.avg.com
Maybe Matching Threads
- Getting an error calling MASS::boxcox in a function
- Getting an error calling MASS::boxcox in a function
- Getting an error calling MASS::boxcox in a function
- Getting an error calling MASS::boxcox in a function
- Getting an error calling MASS::boxcox in a function