I have a dataframe in R of x columns where the first column (C1) contains species names and further column their abundances per samples. I would like to split that dataframe where each new splitted dataframe includes C1 + Cx. Therefore if there was 20 columns, there would be 19 dataframes with C1+C2, C1+C3,C1+C4, etc.
I have been able to split the different columns using lapply and split, but i can't find a way to attach to each of those splitted frames the column C1. Would any have suggestions? Thanks!