[R] function ave() with seq_along returning char sequence instead of numeric

S Ellison S.Ellison at LGCGroup.com
Tue Nov 1 16:29:52 CET 2016


> The help page describes the first argument x as a numeric... 
It also describes the _value_ as numeric. One for the help page issue list?

In fact there seems no obvious reason for a hard restriction to numeric*; the return value will depend largely on what FUN does, as there's no argument class check in the code for ave or for split(), which ave()uses. The principal requirement is presumably that FUN must accept a vector of class class(x) and return a vector of the same length as its argument (or, if there's grouping, a scalar) that split<- (or, with no grouping factor, '<-') can use.

*though plenty of reason to warn of unexpected consequences if not, of course

S Ellison



*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}



More information about the R-help mailing list