![R programming](https://static.wixstatic.com/media/90b6f2_15610ef310534384b3037ca11b588cdd~mv2_d_2874_1619_s_2.png/v1/fill/w_980,h_552,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/90b6f2_15610ef310534384b3037ca11b588cdd~mv2_d_2874_1619_s_2.png)
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
Comentarios