short_pairs: Convert long paired data to short paired data.

Description Usage Arguments Value Examples

Description

This function takes in a data frame containing long paired data with one row / sample in pair and outputs one row / pair. It is on the user to supply grouping columns such that only 2 samples will match the groups. (we don't handled more than 2 cases currently). If there are any columns that contain data not shared by the sample pair they must be included or removed prior to using the function

Usage

1
short_pairs(df, columns, ...)

Arguments

df

A data frame with obseravtions to be combined

columns

columns to be used in combination. They must exist and new columns will be made appending 1 and 2 to these names

...

unquoted grouping columns

Value

the a data frame with a row for each pair

Examples

1
2
3
4
5
6
get_double(small_meta)->small_doub
small_doub<-dplyr::select(small_doub,ENROLLID,pcr_result,HOUSE_ID,SPECID,
onset,collect,vaccination_status,DPI,season,gc_ul,sequenced,home_collected,snv_qualified)
columns = c("SPECID","onset","collect","vaccination_status",
           "DPI","gc_ul","sequenced","home_collected","snv_qualified")
short_pairs(small_doub,columns,ENROLLID,HOUSE_ID,pcr_result,season)

jtmccr1/HIVEr documentation built on May 29, 2019, 1:50 a.m.