read.uv: Format data

View source: R/read.uv.r

read.uvR Documentation

Format data

Description

This function formats a data frame so it can be used with build_bmap, build_gmap, build_pmap, build_bkey and build_gkey.

Usage

read.uv(data = NULL, file = NULL, estimate, error, exceedance)

Arguments

data

A data frame.

file

A CSV file pathway.

estimate

Name of estimate column.

error

Name of error column.

exceedance

Name of exceedance probability column.

Details

Estimates and errors must be in the first and second columns of a data frame for build_bmap, build_gmap, build_pmap, build_emap, build_bkey and build_gkey. read.uv provides an automated way to format a data frame already loaded in R or to import a CSV file as a data frame and arrange the columns correctly.

Examples

data(us_data)
poverty <- read.uv(data = us_data, estimate = "pov_rate", error = "pov_moe")
head(poverty)


pkuhnert/VizU documentation built on March 19, 2024, 10:51 p.m.