getTimeChangeData: Transform data to be vector of rank or value difference...

Description Usage Arguments Value Examples

Description

Transform data to be vector of rank or value difference across defined time difference

Usage

1
getTimeChangeData(group1.1, group1.2, group2.1, group2.2, type, n = 20)

Arguments

group1.1

is meant to be a dataframe with 2 columns. The columns should be the toxicity in a location and the count of the population of interest in that location. Column names are not important, but columns must be ordered with concentration in the first column and population counts in the second column. 1.1 should be the first group at the first time.

group1.2

should be the same format, but the first group at the second time

type

defines how the function calcualtes the difference, with the options being "rank" and "value". The "rank" option caluclates the difference in percentile for a specific number. The "value" option calculates the difference in toxicity at a specific percentile.

n

is an optional parameter, with a default of 500. This defines at how many points the function calcualtes the differences.

Value

Returns a dataframe with two columns. The first is either 'percentile' or 'value' depending on the type chosen, and the second is the difference between groups over the selected time period at those input values.

Examples

1
getTimeChangeData(t1990[, c("lconc", "hispanic")], t2010[, c("lconc", "hispanic")], t1990[, c("lconc", "white")], t2010[c("lconc", "white")], "value")

amd112/rseiAnalysis documentation built on May 28, 2019, 4:55 p.m.