Or in another way: how can I use the operator [[ in a nested list?
[[
You can consider this as the next question on this
but obviously, I just get the second element of all list items in the first level.
EDIT: I found the following with extract respectivel ?"[[" , But still can't wrap it around: "[[ can be applied recursively to lists, so that if the single index i is a vector of length p, alist[[i]] is equivalent to alist[[i1]]...[[ip]] providing all but the final indexing results in a list."
extract
?"[["
"[[ can be applied recursively to lists, so that if the single index i is a vector of length p, alist[[i]] is equivalent to alist[[i1]]...[[ip]] providing all but the final indexing results in a list."
EDIT: Don't want to end up with such nesting loops.
o <- list() i=1 for (i in 1:2){ o[[i]] <- mylist[[c(i,1,1,1)]] }
I found the answer in the meantime. I canβt say that I did it myself. This gives a detailed explanation of how to use another (complex) recursive function to linearize the entire nested wad list.
What's really nice about Akhil S. Behl's solution: it deals with the fact that data.frames are also lists, and recursion can stop in front of data.frames. It turned out that this was one of my main problems.
Source: https://habr.com/ru/post/1446920/More articles:Sorting an array by an index variable - sortingClosed HashMap in Java / Scala - javaHow to change the "X" button in the jquery dialog to read "Close" - jqueryIs there a maximum character limit for a counter in WP8 live fragments? - windows-phone-8Getting collection index in pseudo-class? (jquery 1.8+) - jqueryjQuery Fancybox trigger - jqueryHow to make webview posts? - androidFancybox iframe form manipulation - with ajax - jqueryWhat to use for multiple correlation? - pythonlibphonenumber in iOS example - iosAll Articles