So after some work I created a list with two lists containing data frames (every data frame has only one column with numeric values but different number of rows):
df1 <- data.frame(c(1:10)) df2 <- data.frame(c(2:9)) df3 <- data.frame(c(3:14)) df4 <- data.frame(c(4:13)) df5 <- data.frame(c(1:10)) df6 <- data.frame(c(2:20)) df7 <- data.frame(c(3:16)) df8 <- data.frame(c(4:9)) list_1 <- list(df1,df2,df3,df4) list_2 <- list(df5,df6,df7,df8) list_3 <- list(list_1, list_2)
The first list contains data frames of femal probands, while the second list contains data frames of male probands. I want to compare df1 from the first list and df5 from the second list; df2 from the first list and df6 from the second list;...with boxplots made by plot_ly (so two boxplots in one plot side by side). Does anyone have an idea how this works? I know how it works theoretically (https://plot.ly/r/box-plots/), but I don't know how to select the right entry from the list.
So the first entry from my list_3 is list_3[]. But in my case list_3[] is a whole list of data frames. How do I choose the first data frame df1 whthin the first entry of my list_3?