Learn R Programming

⚠️There's a newer version (0.5.1) of this package.Take me there.

Overview

The goal of crimeutils is to provide a set of helper functions to make common data tasks in criminology research - clean, explore, analyze, visualize - a bit easier.

Installation

You can install the released version of crimeutils from CRAN with:

install.packages("crimeutils")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("jacobkap/crimeutils")

Usage

library(crimeutils)

Copy Link

Version

Install

install.packages('crimeutils')

Monthly Downloads

267

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Jacob Kaplan

Last Published

September 15th, 2020

Functions in crimeutils (0.1.0)

%>%

Pipe operator
make_state_abb

Returns abbreviations of state name input.
indicate_outliers

Creates new columns to indicate which values are outliers based on the average value.
make_barplots

Make a nice-looking barplot.
capitalize_words

Capitalizes the first letter of every word
make_desc_stats_table

Create a descriptive statistics table from numeric variables
make_latex_tables

Creates a .tex file with LaTeX code to create a table from an R data.frame.
scale_color_crim

A set of colorblind friendly colors for graphs.
pad_decimals

Pad decimal places with trailing zeros.
scale_fill_crim

A set of colorblind friendly fill colors for graphs.
time_series_data_graph

Create a PDF with one time-series graph for each group in the data.
scatterplot_data_graph

Create a PDF with one scatterplot for each group in the data.
make_stat_count_plots

Make a nice-looking stat_count (similar to barplot) plot.
theme_crim

A minimalist theme designed for graphics in academic research
scale_linetype_crim

A set of linetypes
ucr_constant_reporter_oris

Get ORIs that consistently report their data every year.