how to extract a single column from a dataframe in r code example
Example: r - extracting specific columns from a data frame
### Solution 2
library(dplyr)
df %>%
select(A, B, E)
### Solution 2
new_df <- subset(df, select=c("A", "B", "C"))
### Solution 2
library(dplyr)
df %>%
select(A, B, E)
### Solution 2
new_df <- subset(df, select=c("A", "B", "C"))