knitr::opts_chunk$set( collapse = TRUE, comment = "NV>", fig.path = "man/figures/README-", out.width = "100%" )
Factors are a very useful type of variable in R, but they can also be very aggravating. This package provides some helper functions for the care and feeding of factors.
You can install the released version of FooFactors from CRAN with:
install.packages("FooFactors")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("shakkyaNV/FooFactors")
This is a basic example which shows you how to solve a common problem:
library(FooFactors)
Binding two factors via fac_bind()
:
a <- factor(c("character", "hits", "your", "eyeballs")) b <- factor(c("but", "integer", "where it", "counts"))
Simply concatenating two factors leads to a result that most don't expect.
c(a, b)
The fbind()
function glues two factors together and returns factor.
fac_bind(a, b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.