Tabyl(x, meat_colour) # meat_colour n percentĬompare to the base R approach: table(x$meat_colour) # When called on a factor, it will include missing levels in the result (levels not present in the vector).It can be called with %>% in a pipeline.When NA values are present, it will calculate an additional column valid_percent.It automatically calculates percentages.It returns a ame - for manipulating further, or printing with knitr::kable().Tabyl() takes a vector and returns a frequency table, like table(). # 6 RightSideScanTime right_side_scan_time We can compare the column names of the imported data and the cleaned data frame: ame(mymsa = colnames(mymsa), x = colnames(x)) # mymsa x To begin we import the excel file into an object called mymsa and create a new object, x, that has clean names: library(janitor) Converts “%” to “percent” to retain meaning.
0 Comments
Leave a Reply. |