Small suite of useful functions and utilities used for data manipulation and coding in the R environment.
To install the latest development
version of stutils
from
GitHub, first install the
devtools package and run:
devtools::install_github("stufield/stutils", build = TRUE)
If you specify a tag, you can install a GitHub release.
devtools::install_github("stufield/[email protected]", build = TRUE)
- test_data
- A quick sample
tibble
for running examples and checking functions acting upon data frames. See?tibble
. - The format of
test_data
is:
- A quick sample
Column | Definition |
---|---|
pid | sprintf("%02i", 1:40) |
Pop | rep(head(LETTERS, 10), 4) |
Sample | factor(sample(c("small", "medium", "large"), 40, replace = TRUE)) |
TimePoint | factor(rep(c("baseline", "6 months", "12 months", "24 months"), each = 10)) |
a | round(rnorm(40, mean = 25, sd = 3.5), 0) |
b | sample(0:6, 40, replace = TRUE) |
seq.1234.56 | rnorm(40, 25, 3.5) |
seq.6969.42 | rnorm(40, 25, 1.5) |
x | rnorm(40, mean = 5, sd = 3) |
y | round(runif(40, 10, 20), 0) |
z | round(rnorm(40, mean = 1, sd = 0.5), 3)) |
Response | factor(sample(c("control", "disease"), 40, replace = TRUE))) |
- tree_data
- Sala et. al.
- Ri_data
- Coefficient Interclass Correlation Data Example from Sokal & Rohlf (Biometry; 3rd ed.), pages 210-214.
- InfectionByCounty
- Infection data describing the infections count data of an infectious disease by geographic position for 3082 individual cases.
- Source: Dylan George, EEID 2008
- nyflights13
- New York city airport flight data from 2013 (must install)
- install with
install.packages("nyflights13", repos="http://cran.rstudio.com")
The online package vignette has a complete tutorial. You can load the compiled version from an R session.
vignette("stutils")
R for Data Science Advanced R R Packages
This package (suite of programs) is free software; you can redistribute it and/or modify it under the terms of the MIT License. See please see the LICENSE. By using in this package you agree to abide by its terms.
Created by Rmarkdown (v2.6) and R version 3.6.3 (2020-02-29).