Create Dataframe using Row
The data frame created by tibble contains rows and columns arranged in a tabular structure. It illustrates the data type of the data frame’s column. It can be created in R using the following dimensions
R
# Using the required libraries library ( "dplyr" ) # Declaring a tibble data = tibble (col1= c (1, 4, 2, 5, 6, 9, 5, 3, 6, 3), col2= c ( "a" , "b" , "a" , "c" , "b" , "b" , "b" , "a" , "c" , "a" ), col3= c (3, 2, 4, 2, 1, 4, 8, 6, 4, 2)) # Arranging data rowwise data % > % rowwise () |
Output:
Row wise operation in R using Dplyr
The dplyr package in R programming is used to perform simulations in the data by performing manipulations and transformations. It can be installed into the working space using the following command :
install.packages("dplyr")