profrep {profrep}R Documentation

Perform Profile Repeatability

Description

Perform Profile Repeatability

Usage

profrep(df, n_timepoints, sort = TRUE, verbose = FALSE)

Arguments

df

The input data frame, of minimum shape 3 rows by 4 columns. This can be read in from a csv or another data frame stored in memory. It is assumed that the data frame is of the following structure: Column 1 is the unique identifier of an individual animal or sample Column 2 is the time of the sample Column 3-N are the columns of replicate data. Row 1 is assumed to be header strings for each column.

n_timepoints

The number of rows an individual sample will have. For example, if the replicates were collected for individual 1 at times 15 and 30, for replicates A and B, the data frame would look like:

            | id | time | A | B |
            |:--:|:----:|:-:|:-:|
            | 1  | 15 | 1 | 2 |
            | 1  | 30 | 3 | 4 |
sort

A boolean parameter that defaults to TRUE. If TRUE, sorts the returned data frame by score. If FALSE, returns the data in the individual order in which it was provided.

verbose

A boolean parameter that defaults to FALSE. Determines whether messages are printed.

Details

Calculates the profile repeatability measure of the input data according to the method in Reed et al., 2019, J. Gen. Comp. Endocrinol. (270).

Value

Returns a data frame of the results, in the following form:

See Also

do_ordering for the main data processing function.

calculate_crossovers for how the number of crossings are calculated.

score_individual_df for how the score is calculated for an individual or sample.

clean_data for how missing replicate values are handled.

Examples

test_data <- profrep::example_two_point_data
results <- profrep::profrep(df=test_data, n_timepoints=2)
print(results)


[Package profrep version 1.0.0 Index]