[R] Dispatching on 2 arguments?

2021-11-06 Thread Leonard Mada via R-help
Dear List-members, I would like to experiment with dispatching on 2 arguments and have a few questions. p1 = data.frame(x=1:3, coeff=1) class(p1) = c("pm", class(p1)); I want to replace variables in a polynomial with either: another polynomial, or another variable (character) or with a

Re: [R] Environmental oddity.

2021-11-06 Thread Deepayan Sarkar
On Sun, Nov 7, 2021 at 6:05 AM Rolf Turner wrote: > > > I have two functions which appear to differ only in their environments. > They look like: > > > d1 > > function (x, mean = 0, sd = 1, log = FALSE) > > (((x - mean)/sd)^2 - 1) * if (log) 1 else dnorm(x, mean, sd)/sd > > > > and > > > d2 > >

Re: [R] Environmental oddity.

2021-11-06 Thread Jeff Newmiller
In general, the search for symbols for a function Z in a package Y will span only those namespaces that the package Y specifies. The search for symbols in a function whose parent environment is the global environment will start there, thereby opening the door to find masking versions of

[R] Environmental oddity.

2021-11-06 Thread Rolf Turner
I have two functions which appear to differ only in their environments. They look like: > d1 > function (x, mean = 0, sd = 1, log = FALSE) > (((x - mean)/sd)^2 - 1) * if (log) 1 else dnorm(x, mean, sd)/sd > and > d2 > function (x, mean = 0, sd = 1, log = FALSE) > (((x - mean)/sd)^2 - 1) *

Re: [R] extracting a R object from an R image

2021-11-06 Thread Martin Maechler
> Jeff Newmiller > on Fri, 05 Nov 2021 16:45:02 -0700 writes: > IMO you are being a bit too literal. It is absolutely possible to load the file into a dedicated environment and use the $ or [[]] extraction operator to access a specific object in that environment. > ?load

[ESS] How to stop lots of carriage returns with company-quickhelp?

2021-11-06 Thread Alasdair McAndrew via ESS-help
Actually I'm not sure if they are carriage returns, or just returns, but in my emacs, when I enter an R command, then the company mode popups always put in a few extra lines with each letter I type. For example, if I type "library", since each new letter causes a new popup, by the time I've

Re: [R] bootstrap confidence intervals

2021-11-06 Thread Rui Barradas
Hello, Às 01:36 de 06/11/21, David Winsemius escreveu: On 11/5/21 1:16 PM, varin sacha via R-help wrote: Dear R-experts, Here is a toy example. How can I get the bootstrap confidence intervals working ? Many thanks for your help library(DescTools)