Re: data =

Olivier Crouzet <[email protected]>
Newsgroups gmane.comp.lang.r.general
Organization Université de Nantes - LLING
Message-ID <[email protected]>
Hi,

As far as I can tell, I don't think the function 'summary()'
will accept the 'data=' argument: see help(summary). Probably the
reference you're mentionning (Andrews *Doing Data Science in R*) is
about another function but not summary().

Olivier.


On Fri, 3 Oct 2025 19:54:42 -0400 R
Jerome Anderson <[email protected]> wrote:

> I can code summary(midterm_df$hv109) and I get the summary of variable
> hv109. No problem.
> 
> Yet when I write the code:
> 
> summary(hv109, data = midterm_df)
> 
> I get this error:
> 
> Error in h(simpleError(msg, call)) : error in evaluating the argument
> 'object' in selecting a method for function 'summary': object 'hv109'
> not found
> 
> If I write the code summary('hv109', data = midterm_df), R treats
> hv109 as if it were a character variable. It is not.
> 
> Page 521 in Andrews *Doing Data Science in R* shows the data = [df]
> command. I thought it was straightforward. Why doesn't my code work?
> 
> Any help w/ this would be appreciated.
> 
> -- Jerome Anderson
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> [email protected] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> https://www.R-project.org/posting-guide.html and provide commented,
> minimal, self-contained, reproducible code.


-- 
  Olivier Crouzet, PhD
  http://olivier.ghostinthemachine.space
  /Maître de Conférences/
  @LLING - Laboratoire de Linguistique de Nantes
    UMR6310 CNRS / Université de Nantes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.