The foofactors
package has 3 functions and this is a demo of how the functions work.
#install_github("jokagyeman/foofacotrs") library(foofactors)
fbind()
The first function is fbind
which puts two factors together as one.
#Here is an example, fbind(iris$Species[c(1,51,101)], PlantGrowth$group[c(1,11,21)])
freq_out()
The second function is freq_out
, which gives you a dataframe with factors and their frequency.
# Here is an example freq_out(iris$Species)
f_keep()
The third function is f_keep
, which prints factor levels as they are in the r object.
# Here is an example sons <- factor(c("John", "Caleb", "Joel")) f_keep(sons)
f_nchar()
This function counts the length of factor level names and prints it in a table arrange in descending order.
# Here is an example Subjects <- factor(c("Mathematics", "Statistics", "English", "French")) f_nchar(Subjects)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.