c("Tag", "site",
> "DATE", "date"), row.names = c(NA, -3L), class = "data.frame")
>
> A$date<-factor(A$DATE, levels=c("t1","t2","t3"))
> tmp <- split(A, A$Tag)
> head(tmp)
> tail(tmp)
> tmp1 <
te"), row.names = c(NA, -3L), class = "data.frame")
A$date<-factor(A$DATE, levels=c("t1","t2","t3"))
tmp <- split(A, A$Tag)
head(tmp)
tail(tmp)
tmp1 <- do.call(rbind, lapply(tmp, function(x){
tb <- table(A$date)
idx <- which(tb>0)
tb1
>
> A$date<-factor(A$DATE, levels=c("t1","t2","t3"))
> tmp <- split(A, A$Tag)
> head(tmp)
> tail(tmp)
> tmp1 <- do.call(rbind, lapply(tmp, function(x){
> tb <- table(A$date)
> idx <- which(tb>0)
> tb1 <- replace(tb, idx, as.c
Hi Kristi,
The first part is relatively easy:
# change first line to
x$time<-factor(x$time,levels=c("t1","t2","t3","t4","t10","t21"))
As you have specified "site" as the second element in "x", not the third,
perhaps you just want:
x<-structure(list(vs = structure(c(1L, 1L, 2L, 3L, 4L, 2L, 3L, 1L
4 matches
Mail list logo