From m@ech|er @end|ng |rom @t@t@m@th@ethz@ch  Mon Jan 10 10:04:11 2022
From: m@ech|er @end|ng |rom @t@t@m@th@ethz@ch (Martin Maechler)
Date: Mon, 10 Jan 2022 10:04:11 +0100
Subject: [Rd] 
 =?utf-8?q?documentation_patch_for_as=2Eformula_=E2=86=92_re?=
 =?utf-8?q?formulate?=
In-Reply-To: <7150b64c-c139-1421-9ba2-1a297dc32ac9@gmail.com>
References: <7150b64c-c139-1421-9ba2-1a297dc32ac9@gmail.com>
Message-ID: <25051.63115.679473.229695@stat.math.ethz.ch>

>>>>> Ben Bolker   on Sun, 9 Jan 2022 16:39:43 -0500 writes:

>    There was some discussion on twitter about the fact
> that the manual page for as.formula() doesn't mention
> reformulate(), and indeed the last example is

> ## Create a formula for a model with a large number of
> variables: xnam <- paste0("x", 1:25) (fmla <-
> as.formula(paste("y ~ ", paste(xnam, collapse= "+"))))


> which could arguably be better done as

>    reformulate(xname, response = "y")

>    I've attached a documentation patch that adds the
> alternative version and a \seealso{} link.

>    Happy to submit to r-bugzilla if requested.

>    cheers Ben Bolker

x[DELETED ATTACHMENT external:  reformulate_patch.txt, plain text]

Thanks a lot, Ben!

I've committed (+-) it to R-devel as svn rev 81464
Martin



[Rd] =?utf-8?q?documentation_patch_for_as=2Eformula_=E2=86=92_re?= =?utf-8?q?formulate?=
Martin Maechler