(R) lapply, sapply, mapply/ two-sample t-test using mapply function
lapply function always returns the result of function as a list from a list. sapply function always returns the result of functions as a vector from a list. > list_1=list(x=rnorm(5,0,1),y=runif(3,5,10))> list_1$x[1] -0.1718824 -0.1953697 -0.3611449 1.1755966 -1.0458594 $y[1] 7.881664 9.084847 9.950752 > list_2 = list(x = rnorm(10,0,1), y = c(rnorm(5,3,8), NA)) > list_2$x [1] 1.76547974 -0.748861..
2020. 11. 17.