Displaying 1 result from an estimated 1 matches for "id02".
Did you mean:
d02
2009 Jul 31
2
merging two data frame with colomns of different length
...bit1 <- c('a','a','a','b','b','b','d','d','d')
Id01 <- paste(Id1, Habit1,sep=".")
data1 <- data.frame(Id01)
# data frame 2
Id2 <- c(1,2,3,3)
Habit2 <- c('a','b','d','d')
Id02 <- paste(Id2, Habit2,sep=".")
Area <- c(10,2,3,5)
data2 <- data.frame(cbind(Id02, Area))
# result that I would like
Area2 <- c(10, 0, 0, 2, 0, 0, 3, 5, 0)
result <- data.frame(cbind(Id01, Area2))
Thank's
--
Julien Beguin