knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
We will use the devtools
package to facilitate package development. Devtools
and my package can be installed with the following commands, and both could be loaded with library
command.
library(devtools)
#load_all() devtools::install_github("zhengdong91/hw8") library(hw8) library(gapminder)
Top20GdpPercap(2002)
qdiff1(gapminder$lifeExp, probs = c(0.25, 0.75)) qdiff1(gapminder$lifeExp, probs = c(0, 1))
freq_out(iris$Species)
a <- factor(c("character", "hits", "your", "eyeballs")) b <- factor(c("but", "integer", "where it", "counts")) fbind(a, b)
There are four functions in the package, we designed Quantiles
and Top20GdpPercap
functions to deal with the gapminder dataset, Quantiles
return the difference of a numeric variable, and Top20GdpPercap
return the top 20 GdpPercap countries in a particular year. I also inplemented two functions fbind
and freq_out
Jenny shared with us in the classes as a practice.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.