Displaying 1 result from an estimated 1 matches for "23_2".
Did you mean:
232
2011 Apr 30
3
indexing into a data.frame using another data.frame that also contains values for replacement
...with no loops involved.
Although my data set is much larger than this, a small example of what
I am trying to do is as follows:
df1 <- data.frame(rows=c("A","B","C", "B", "C", "A"),
columns=c("21_2", "22_2", "23_2", "21_2", "22_2", "23_2"),
values=c(3.3, 2.5, 67.2, 44.3, 53, 66))
df2 <- data.frame(matrix(rep(NA, length(df1$values)),nrow=3, ncol=3))
names(df2) <- c("21_2", "22_2", "23_2")
row.names(df2) <- c("A", "B"...