Learn R Programming

serocalculator (version 1.3.0)

as_pop_data: Load a cross-sectional antibody survey data set

Description

Load a cross-sectional antibody survey data set

Usage

as_pop_data(
  data,
  antigen_isos = NULL,
  age = "Age",
  value = "result",
  id = "index_id",
  standardize = TRUE
)

Value

a pop_data object (a tibble::tbl_df

with extra attribute antigen_isos)

Arguments

data

a data.frame() or tibble::tbl_df

antigen_isos

character() vector of antigen isotypes to be used in analyses

age

a character() identifying the age column

value

a character() identifying the value column

id

a character() identifying the id column

standardize

a logical() to determine standardization of columns

Examples

Run this code
library(magrittr)
xs_data <-
  serocalculator_example("example_pop_data.csv") %>%
  read.csv() %>%
  as_pop_data()

print(xs_data)

Run the code above in your browser using DataLab