[Rd] substitute(INDICES) in by.data.frame returns invalid multi-line name (PR#9108)

From: <pkensche_at_cmbi.ru.nl>
Date: Fri 28 Jul 2006 - 11:53:28 GMT


Full_Name: Philip Kensche
Version: 2.3.0
OS: Redhat Linux
Submission from: (NULL) (131.174.88.204)

Try this:

--

x <- data.frame(the.first.column=c("A"), the.second.column=c("b"), the.third.column=c("d"), and.many.more.columns=c("e"))

by(x, paste(x$the.first.column, x$the.second.column, x$and.many.more.columns, sep="."), function (y) { print("Hello!") })
--

The following error message is produced on my system:

Error in "names<-.default"(`*tmp*`, value = c("paste(x$the.first.column, x$the.second.column, x$and.many.more.columns, ", :

        'names' attribute [2] must be the same length as the vector [1]

Calling substitute(INDICES) after debug(by.data.frame) returns:
--


paste(x$the.first.column, x$the.second.column, x$and.many.more.columns,

    sep = ".")
--

i.e. the sep = ... is on the next line.

Greetings,

Philip



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Jul 28 21:56:35 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 28 Jul 2006 - 14:27:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.