Displaying 1 result from an estimated 1 matches for "x1poli".
Did you mean:
x1poly
2009 Jul 17
1
poly objects as data frame columns
Dear UseRs,
I just learnt that the number of columns of a data frame is not always what
I thought it to be, and I wonder where I should have learnt about this.
Consider the following example:
dat <- data.frame(X1=1:10, X2=LETTERS[1:10])
ncol(dat) ## evaluates to 2 (of course)
dat$X1poly <- poly(dat$X1,3)
dat ## five columns displayed
ncol(dat) ##