I have two lists with different structure:
listA <- list(c(\"a\",\"b\",\"c\"), c(\"d\",\"e\")) listB <- list(0.05, 0.5) listA [[1]] [1] \"a\" \"b\" \"c\"
I'd prefer this:
do.call(rbind, Map(function(...) setNames(cbind.data.frame(...), c("A", "B")), listA, listB)) # A B #1 a 0.05 #2 b 0.05 #3 c 0.05 #4 d 0.50 #5 e 0.50