[Rd] cumprod doesn't work with data frames (PR#2667)
jsisk1 at pacbell.net
jsisk1 at pacbell.net
Sat Mar 22 01:41:43 MET 2003
Full_Name: J. Sisk
Version: 1.6.1
OS: Linux (RedHat 8)
Submission from: (NULL) (67.119.41.66)
Suppose you make a data-frame like so:
xxx <- data.frame(a=10,b=20,c=30,d=40)
Then
cumprod(xxx[1,])
returns
> cumprod(xxx[1,])
a b c d
1 10 20 30 40
The documentation for cumprod says that it should work on "numerical objects",
and this is a data-frame, but it seems like it ought to "do the right thing" in
this case. If this is redundant, my apologies.
More information about the R-devel
mailing list