Package 'UCR.ColumnNames'

Title: Fixes Column Names for Uniform Crime Report "Offenses Known and Clearance by Arrest" Datasets
Description: Changes the column names of the inputted dataset to the correct names from the Uniform Crime Report codebook for the "Offenses Known and Clearance by Arrest" datasets from 1998-2014.
Authors: Jacob Kaplan [aut, cre]
Maintainer: Jacob Kaplan <[email protected]>
License: GPL
Version: 0.1.0
Built: 2025-01-30 05:22:07 UTC
Source: https://github.com/cran/UCR.ColumnNames

Help Index


Column name and code for the UCR Offenses dataset

Description

A dataset containing the name and code corresponding to columns in the Uniform Crime Report "Offenses Known and Clearance by Arrest" dataset for years 1998-2014

Usage

UCR_Offenses_ColNames

Format

A data frame with 1448 rows and 2 variables:

column_name

The column name for the given column, according to the codebook.

column_code

The code for the given column, according to the codebook. This will be the column name of the inputted dataset.

...

Source

http://www.icpsr.umich.edu/icpsrweb/NACJD/studies/36391


Uniform Crime Report Column Name Fixer

Description

Uniform Crime Report Column Name Fixer

Usage

UCR.OffenseNames(UCR_dataset)

Arguments

UCR_dataset

This is the data.frame containing data from the UCR "Offenses Known and Clearance by Arrest" dataset You may use any years from 1998-2014

Value

Returns the same data.frame as inputted but with column names corrected as per the UCR "Offenses Known and Clearance by Arrest" codebook for years 1998-2014

Examples

# This is an example data.frame with the same column names
# as the real UCR dataset.
example <- data.frame(V1 = 1:10, V2 = 2:11, V8 = "example")
names(example)
example <- UCR.OffenseNames(example)
names(example)