Extracting specific columns from a data frame in R

R Programming Assignment Help

Using the dplyr package.

Suppose df is data.frame in r


Use the following code:


library(dplyr)

1. Using "%>%" pipe expression

df %>% select(A, B, E)

Here A,B,C are columns name


2. Without pipe expression:

select (df, A, B, C)


3. Select columns range:

select (df, 1 : 3)

in this case output will be from column 1 to 3.



If you like Codersarts blog and looking for Assignment help,Project help, Programming tutors help and suggestion you can send mail at contact@codersarts.com.


Please write your suggestion in comment section below if you find anything incorrect in this blog post


#R #Rprogramming #RAssignmentHelp #Rprogramming #dataanalyst.

Contact Us

Tel: (+91) 0120  4118730  

Time :   10 : 00  AM -  08 : 00 PM IST 

Registered address: G-69, Sector 63, 

 Noida - 201301, India

We Provide Services Across The different countries

USA    Australia   Canada   UK    UAE    Singapore   New Zealand    Malasia   India   Ireland   Germany

CodersArts is a Product by Sofstack Technology Solutions Pvt. Ltd.

  • CodersArts | Linkedin
  • Instagram