knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The goal of numvert is to help transform numeric vectors by way of functions that:
num_
You can install numvert from github with:
# install.packages("devtools") devtools::install_github("drsimonj/numvert")
This example shows you how to conduct common rescaling operations with numvert:
# Create a normally distributed variable with a mean of 25 and SD of 5 x <- rnorm(1000, mean = 25, sd = 5) hist(x)
Use numvert to standardise or normalise it:
library(numvert)
# Normalise between 0 and 1 x_norm <- num_normalize(x) hist(x_norm)
# Standardise to have mean of 0 and SD of 1 x_std <- num_standardize(x) hist(x_std)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.