Skip to contents

aggregateCRT aggregates data from a "CRTsp" object or trial data frame containing multiple records with the same location, and outputs a list of class "CRTsp" containing single values for each location, for both the coordinates and the auxiliary variables.

Usage

aggregateCRT(trial, auxiliaries = NULL)

Arguments

trial

An object of class "CRTsp" containing locations (x,y) and variables to be summed

auxiliaries

vector of names of auxiliary variables to be summed across each location

Value

A list of class "CRTsp"

Details

Variables that in the trial dataframe that are not included in auxiliaries are retained in the output algorithm "CRTsp" object, with the value corresponding to that of the first record for the location in the input data frame

Examples

{
trial <- readdata('example_site.csv')
trial$base_denom <- 1
aggregated <- aggregateCRT(trial, auxiliaries = c("RDT_test_result","base_denom"))
}