From S@Elli@on @ending from LGCGroup@com  Mon Dec 17 13:49:14 2018
From: S@Elli@on @ending from LGCGroup@com (S Ellison)
Date: Mon, 17 Dec 2018 12:49:14 +0000
Subject: [Rd] Documentation examples for lm and glm
In-Reply-To: <8a02fe1f-179a-665f-376e-540e5857bbde@auckland.ac.nz>
References: <b0027661-4c72-864d-7dea-a78ade7bf808@auckland.ac.nz>
 <3aee4716-f0d2-c683-0ad8-90ae6c5894ef@gmail.com>
 <b578698e1aac4d26b75c3f2dc0f560cc@GBDCVPEXC04.corp.lgc-group.com>
 <CAARY7khwiMrFAH0NUfhKA=L++xn-ygQHcRng7vojj4epSv36gg@mail.gmail.com>
 <alpine.DEB.2.21.1812151342530.19588@paninaro>
 <20181215142400.7h4onph6ruh2isq5@ofb.net>
 <alpine.DEB.2.21.1812170019110.14461@paninaro>
 <8a02fe1f-179a-665f-376e-540e5857bbde@auckland.ac.nz>
Message-ID: <8dfc5e4497c54e7db43bb4e2a67b63e3@GBDCVPEXC04.corp.lgc-group.com>



> From: Thomas Yee [mailto:t.yee at auckland.ac.nz]
> 
> Thanks for the discussion. I do feel quite strongly that
> the variables should always be a part of a data frame. 

This seems pretty much a decision for R core, and I think it's useful to have raised the issue.

But I, er, feel strongly that strong feelings and 'always' are unsafe in a best practice argument. 

First, other folk with different use-cases or work practice may see 'best practice' quite differently. So I would pretty much always expect exceptions.

Second, for examples of capability, there are too many exceptions in this instance. For example:
glm() can take a two-column matrix as a single response variable. 
lm() can take a matrix as a response variable. 
lm() can take a complete data frame as a predictor (see ?stackloss)

None of these work naturally if everything is in a data frame, and some won?t work at all.

Steve E




*******************************************************************
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If 
you have received this message in error, please notify the sender 
immediately via +44(0)20 8943 7000 or notify postmaster at lgcgroup.com 
and delete this message and any copies from your computer and network. 
LGC Limited. Registered in England 2991879. 
Registered office: Queens Road, Teddington, Middlesex, TW11 0LY, UK


[Rd] Documentation examples for lm and glm
S Ellison