I have a nested list containing 15 datasets (also lists), each of which has 3 columns but a variable number of rows (thousands each). The top of the last dataset looks like this in the console:
[[15]]
Object.Number Internal Membrane
1 0 8.275335e+03 2575.41042
2 2 1.225267e+04 5813.50000
3 3 9.554725e+03 2483.51172
I would like to make a 5x3 grid of density plots, created using the values in the 2nd column of each of 15 datasets.
I thought I could do this with lapply (myFiles, densityplot(args))
but I can't find a way to reference the column within the arguments for densityplot
.
Would be grateful for any insights on how this can be achieved.