Learn R Programming

serosv (version 1.1.0)

transform_data: Generate a dataframe with `t`, `pos` and `tot` columns from `t` and `seropositive` vectors.

Description

Generate a dataframe with `t`, `pos` and `tot` columns from `t` and `seropositive` vectors.

Usage

transform_data(t, spos, heterogeneity_col = "t")

Value

dataframe in aggregated format

Arguments

t

the time vector.

spos

the seropositive vector.

heterogeneity_col

new name for the time vector (default to "t")

Examples

Run this code
df <- hcv_be_2006
hcv_df <- transform_data(df$dur, df$seropositive)
hcv_df

Run the code above in your browser using DataLab