On 2025-03-30 11:41 a.m., Bert Gunter wrote:
Gabor, Duncan, et. al.
1. Thank you for your great comments and solutions. This is what I was
hoping for!
2. Duncan: I completely agree with your criticisms. In fact, I realized the
for() loop only needed the <- assignment, but your comment is import
Another solution. reformulate + substitute + as.formula:
substitute(~ (.)^2, list(. = reformulate(somenames)[[2]])) |> as.formula()
On Sat, Mar 29, 2025 at 5:31 PM Bert Gunter wrote:
>
> Note: I am almost certain that this has been asked and answered here
> before, so my apologies for the redun
Gabor, Duncan, et. al.
1. Thank you for your great comments and solutions. This is what I was
hoping for!
2. Duncan: I completely agree with your criticisms. In fact, I realized the
for() loop only needed the <- assignment, but your comment is important to
note. However, I didn't like the for() l
reformulate + update:
somenames |> reformulate() |> update(~ (.)^2)
On Sat, Mar 29, 2025 at 5:31 PM Bert Gunter wrote:
>
> Note: I am almost certain that this has been asked and answered here
> before, so my apologies for the redundant query.
>
> I also know that there are several packages that
Your approach seems reasonable to me, though I wouldn't do it that way.
The way I work this sort of thing out is to get R to do a simple
example, then see what it did, and duplicate that.
For example,
f <- ~ (Heigh + Ho + Silver + Away)^2
Then look at as.list(f), as.list(f[[2]]), as.list(
Note: I am almost certain that this has been asked and answered here
before, so my apologies for the redundant query.
I also know that there are several packages that will do this, but I wish
to do it using base R functions only (see below).
The query: Suppose I have a character vector of names l
6 matches
Mail list logo