I have a dataframe as follows where the top is the column name and each column only has one value:
Sample122 df122 gd412 AKM 532 d21h_7
32 4 12 25 2 55
I also have a dataframe as follows
ID CN
Sample22 2
AKM 1
532 0
I would like to remove the columns in the dataframe based on the list I have. How can I do this?
df1[, !names(df1) %in% df2$ID ]?setdiffie.df1[setdiff(names(df1),df2$ID)]