Brandt, T. (Tobias) escribió: > > I think the following does what you want: > > > (d <- structure(c(6586, 6586, 6589, 6593, 6593, 6593, 6598, 6598, > 6598, 6598), class = "Date")) > [1] "1988-01-13" "1988-01-13" "1988-01-16" "1988-01-20" "1988-01-20" > "1988-01-20" "1988-01-25" > [8] "1988-01-25" "1988-01-25" "1988-01-25" > > (td <- table(d)) > Dear Tobias,
Yes it does!! And it's enough with the last sentence: td<-table(d) since the following outputs (don't know why, probably because I'm working with a zoo object?): names(td) <- as.Date(as.numeric(names(td))) # to make the names more readable Warning message: NAs introducidos por coerción > print(td) <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> 2 1 3 6 5 4 3 4 3 1 1 1 10 1 1 2 Thanks a lot! Antonio > d > 6586 6589 6593 6598 > 2 1 3 4 > > names(td) <- as.Date(as.numeric(names(td))) # to make the names > more readable > > print(td) > 1988-01-13 1988-01-16 1988-01-20 1988-01-25 > 2 1 3 4 > > > > HTH, > > Tobias > ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.