I have an object of the following structure, which is not that common for me (with a dataframe within a dataframe with a list in it). I want to add new observations, which all have the same values for all variables (except 1); here the values come from a extra list via index). The nested structure of the object makes it difficult to do this with a loop. Therefore I copied the output of dput and entered values into it. I used mainly the function rep() and once unlist(). Executing it and printing the object I get a warning message about a corrupt a dataframe and the object hasn't changed.
Which is the common way to add rows to a given structure? I tried looping over it but hadn't had success yet.
deput(x)
structure(list(collapsed = c(FALSE, FALSE, FALSE), enabled = c(TRUE,
TRUE, TRUE), id = c("Bilateral", "AlphaTree", "Merge"), parameters = structure(list(
bands = list(c(1L, 2L, 3L, 5L), c(1L, 2L, 3L, 5L), NULL),
intensity = c(3L, NA, NA), saveToDisk = c(FALSE, NA, NA),
Strategy = c(NA, "maxDiff", NA), Attribute = c(NA,
"", NA), om = c(NA, 27L, NA), Condition = c(NA, NA,
"num < 10"), check = c(NA, NA, FALSE), ite = c(NA,
NA, 10L), Algo = c(NA, NA, "closest mean")), class = "data.frame", row.names = c(NA,
3L)), type = c("PreProc", "Seg", "Op")), class = "data.frame", row.names = c(NA,
3L))