thinData: Thin a large data set

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.R

Description

Thin large data sets to contain fewer observations

Usage

1
thinData(data, xy = c(1, 2), by = 2)

Arguments

data

A data.frame.

xy

A numeric vector designating the columns where x and y are located in data.

by

An integer specifying the thinning rate. Analogous to the by argument from the seq command from the base package.

Details

This function is used do reduce the size of large data sets to improve overall computation time for rankLocReg. locReg takes approximately 5 minutes to complete for data sets of ~500 observations, and computation time increases exponentially with larger data sets. Provided that the data is of suitably high resolution, thinning larger data sets is a reasonable solution for reducing this computation time.

Value

A list of data frames with thinned observations.

Author(s)

Colin Olito. #'

Examples

1
2
3
4
5
6
# load sea urchin respirometry data
data(UrchinData)
head(UrchinData)
# thin data for individual "D" by 1/2
newData  <-  thinData(UrchinData, xy=c(1,5), by=2)
head(newData[[1]])

colin-olito/LoLinR documentation built on May 13, 2019, 9:54 p.m.