Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

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"))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #extracting #specific #columns #data #frame
ADD COMMENT
Topic
Name
9+1 =