getTimesSubset: Forms a subset of 'responses' in 'data' that contains their...

getTimesSubsetR Documentation

Forms a subset of responses in data that contains their values for the nominated times

Description

Forms a subset of each of the responses in data that contains their values for the nominated times in a single column.

Usage

getTimesSubset(data, responses, 
               individuals = "Snapshot.ID.Tag", times = "DAP", 
               which.times, suffix = NULL, sep.suffix.times = ".", 
               include.times = FALSE, include.individuals = FALSE)

Arguments

data

A data.frame containing the column from which the growth rates are to be calculated.

responses

A character giving the names of the columns in data whose values are to be subsetted.

individuals

A character giving the name of the column in data containing an identifier for each individual (e.g. plant, pot, cart, plot or unit).

times

A character giving the name of the column in data containing the times at which the data was collected, either as a numeric, factor, or character. It will be used to identify the subset and, if a factor or character, the values should be numerics stored as characters.

which.times

A vector giving the times that are to be selected.

suffix

A character giving the suffix to be appended to responses to form the names of the columns containing the subset.

sep.suffix.times

A character giving the separator to use in appending a suffix for times to a trait. For no separator, set to "".

include.times

A logical indicating whether or not to include the times in the result, the name in the result having the suffix with a separating full appended.

include.individuals

A logical indicating whether or not to include the individuals column in the result.

Value

A data.frame containing the subset of responses ordered by as many of the initial columns of data as are required to uniquely identify each row (see order for more information). The names of the columns for each of the responses and for times in the subset are the concatenation of their names in data and suffix, separated by a full stop.

Author(s)

Chris Brien

Examples

data(exampleData)
sPSALast <- getTimesSubset("sPSA", data = longi.dat, times = "DAP", 
                           which.times = c(42), suffix = "last")

growthPheno documentation built on Oct. 24, 2023, 5:08 p.m.