From jfox @ending from mcm@@ter@c@  Mon Dec 17 15:33:27 2018
From: jfox @ending from mcm@@ter@c@ (Fox, John)
Date: Mon, 17 Dec 2018 14:33:27 +0000
Subject: [Rd] Documentation examples for lm and glm
In-Reply-To: <30491_1545056764_wBHEQ3mD028078_8dfc5e4497c54e7db43bb4e2a67b63e3@GBDCVPEXC04.corp.lgc-group.com>
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>
 <30491_1545056764_wBHEQ3mD028078_8dfc5e4497c54e7db43bb4e2a67b63e3@GBDCVPEXC04.corp.lgc-group.com>
Message-ID: <0119928F-8998-4B14-99E4-678EE74D1E99@mcmaster.ca>

Dear Steve,

Since this relates as well to the message I posted a couple of minutes before yours, I agree that it?s possible to phrase ?best practices? too categorically. In the current case, I believe that it?s reasonable to say that specifying the data argument is ?generally? or ?usually? the best option. That doesn?t rule out exceptions.

Best,
 John

  -------------------------------------------------
  John Fox, Professor Emeritus
  McMaster University
  Hamilton, Ontario, Canada
  Web: http::/socserv.mcmaster.ca/jfox

> On Dec 17, 2018, at 7:49 AM, S Ellison <S.Ellison at LGCGroup.com> wrote:
> 
> 
> 
>> 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
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Documentation examples for lm and glm
Fox, John