'x' is a matrix and not a dataframe. You should be doing
colnames(x) <- c("Date", "quarter")
x[,"Date"] <- as.Date(x[,"Date"])
It would help if you took a look at the structure you were using to
understand how to access. 'names' applied to a vector would give you
the output for 13000 more entr
This suggestion does not work. x seems to have twice the number of
entries as spl.
> x <- do.call(rbind, spl)
> names(x) <- c('Date', 'quarter')
> x$Date <- as.Date(x$Date)
Error in x$Date : $ operator is invalid for atomic vectors
> x$quarter <- as.numeric(x$quarter)
Error in x$quarter : $ operato
Try this also:
do.call(rbind, spl)
On Mon, Jan 18, 2010 at 7:48 PM, James Rome wrote:
> I successfully combined my data frames, and am now on my next hurdle.
>
> I had combined the data and quarter, and used tapply to count the
> entries for each unique date/quarter pair.
> ar= tapply(ewrgnd$gw,
"c" "C"
> matrix(unlist(tempList), nrow=3, byrow=T)[,1]
[1] "a" "b" "c"
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of James Rom
I successfully combined my data frames, and am now on my next hurdle.
I had combined the data and quarter, and used tapply to count the
entries for each unique date/quarter pair.
ar= tapply(ewrgnd$gw, list(ewrgnd$dq), sum) #for each date/quarter
combination sums the gw (which are all 1)
dq=row.n
5 matches
Mail list logo