fars_map_state: fars_map_state

Description Usage Arguments Details Value See Also Examples

View source: R/fars_map_state.R View source: R/fars_functions.R

Description

The function fars_map_state transform the principal database and add conditionals for some variables. Plot a map with a specific lat and long.

The function fars_map_state transform the principal database and add conditionals for some variables. Plot a map with a specific lat and long.

Usage

1
2
3
fars_map_state(state.num, year)

fars_map_state(state.num, year)

Arguments

state.num

as a variable that represent a state.

year

as a variable to tranform it in an integer value.

Details

you need to install the package "map" and specify a number of a state.

you need to install the package "map" and specify a number of a state.

Value

if number of a state is unique and it is contained in the variable STATE of the data it will make a data frame with this, with conditionals to transform NAs in the variables LONGITUD AND LATITUDE and print a map with this location. Otherwise print a message "no accidents to plot" and return an invisible object.

if number of a state is unique and it is contained in the variable STATE of the data it will make a data frame with this, with conditionals to transform NAs in the variables LONGITUD AND LATITUDE and print a map with this location. Otherwise print a message "no accidents to plot" and return an invisible object.

See Also

fars_summarize_years

make_filename

fars_read

Examples

1
2
## Not run: fars_map_state(19, 2013)
fars_map_state(19, 2013)

RG9303/Project-RG-Package documentation built on June 16, 2020, 3 p.m.