Jay P. answered 06/25/19
Tutor
New to Wyzant
R tutor with 10+years of R coding experience
Hi,
Try this code below:
df[ ,names(df)%in%c("A","B","E"))] # if column names are important
Thanks,
Jay
Jay P. answered 06/25/19
R tutor with 10+years of R coding experience
Hi,
Try this code below:
Thanks,
Jay
Anthony S. answered 06/22/19
Statistic M.S. Candidate
newdf<-df[ ,c(1,2,5)] where 1,2, & 5 are the columns' position in the original data frame.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.