I'm pretty new to R, and was wondering if there is a way to store vectors in a data frame such that each entry of the data frame is a vector.
I want to assign the entry to a vector, and be able to change it later:
df[2,]$Value <- c(1,2,0)
df[3,]$Value <- c(0,0,1)
df[3,]$Value <- df[3,]$Value + c(2,4,4)
But can only make this work as replacing 3 different entries in the data frame. Does anyone know if this is possible?
df:
V1 V2 V3
1 c(1,2) c(2,3) c(0,0)
2 c(1,1) c(0,0) c(2,2)