Skip to content

Instantly share code, notes, and snippets.

@mbannert
Created May 20, 2014 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbannert/29c6ffb63837b0bdefcd to your computer and use it in GitHub Desktop.
Save mbannert/29c6ffb63837b0bdefcd to your computer and use it in GitHub Desktop.
Example for Pauliina
test <- list()
test[[1]] <- cor(matrix(rnorm(20),ncol=4))
test[[2]] <- cor(matrix(rnorm(20),ncol=4))
test[[3]] <- cor(matrix(rnorm(20),ncol=4))
# should be 1: element 1,1
lapply(test,"[[",2)
lapply(test,function(x) x[2,2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment