This Question refers to this Is there a best way to append a list values to a sublist of a list in R?.
One of the solution is this:
a <- list(3,5,7)
l <- list(c(1,2,3), c(2,1,4), c(4,7,6))
mapply(c, l, a, SIMPLIFY=F)
If I try to apply it on my machine I get the error:
Error in SIMPLIFY == "array" :
comparison (1) is possible only for atomic and list types
If I use this -> there is no error:
mapply(c, l, a, SIMPLIFY = FALSE)
I want to understand why the error occurs in using SIMPLIFY =F and not in SIMPLIFY = FALSE
.
I am using rstudio - cloud:
> version
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 1.3
year 2022
month 03
day 10
svn rev 81868
language R
version.string R version 4.1.3 (2022-03-10)
nickname One Push-Up