1

I tried a simple test, but I am not sure how to interpret the results correctly.

a <- 1:10
b <- lapply(a,'[',2)

The code I am analyzing used the lapply function along with the arguments listed above.

The output confused me as it gave me a list of 10 int values, all of which were NA. This probably means a needs to be a list, but I am not sure.

I couldn't find anything with a google search, and I am not sure how to interpret my test (if I even used it in the correct context).

d.b
  • 31,615
  • 5
  • 30
  • 71
hkj447
  • 665
  • 6
  • 16

0 Answers0