[Rd] Give update.formula() an option not to simplify or reorder the result -- request for comments

Pavel N. Krivitsky p@ve| @end|ng |rom uow@edu@@u
Fri May 17 09:31:04 CEST 2019


Dear All,

Martin Maechler has asked me to send this to R-devel for discussion
after I submitted it as an enhancement request (
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17563).

At this time, the update.formula() method always performs a number of
transformations on the results, eliminating redundant variables and
reordering interactions to be after the main effects. This is not
always the desired behaviour, because formulas are increasingly used
for purposes other than specifying linear models.

This the proposal is to add an option simplify= (defaulting to TRUE,
for backwards compatibility) that if FALSE will skip the simplification
step.

That is,

> update(a~b:c+b, .~.+b) # default: simplify=TRUE

a ~ b + b:c

> update(a~b:c+b, .~.+b, simplify=FALSE) # results are a mock-up

a ~ b:c + b + b

>From what I can tell, this can be accomplished by skipping the second
line of the implementation of update.formula() ("out <-
formula(terms.formula(tmp, simplify = TRUE))").

Any thoughts? One particular question that Martin raised is whether the
UI should be just a single logical argument, or something else.

			Best Regards,
			Pavel

-- 
Pavel Krivitsky
Lecturer in Statistics
National Institute of Applied Statistics Research Australia (NIASRA)
School of Mathematics and Applied Statistics | Building 39C Room 154
University of Wollongong NSW 2522 Australia
T +61 2 4221 3713
Web (NIASRA): http://niasra.uow.edu.au/index.html
Web (Personal): http://www.krivitsky.net/research
ORCID: 0000-0002-9101-3362

NOTICE: This email is intended for the addressee named and may contain
confidential information. If you are not the intended recipient, please
delete it and notify the sender. Please consider the environment before
printing this email.



More information about the R-devel mailing list