vascr_subset: Subset a vascr datset based on a numebr of factors

View source: R/vascr_align.R

vascr_subsetR Documentation

Subset a vascr datset based on a numebr of factors

Description

Subset a vascr datset based on a numebr of factors

Usage

vascr_subset(
  data.df,
  time = NULL,
  unit = NULL,
  well = NULL,
  value_greater_than = NULL,
  value_less_than = NULL,
  value_equal_to = NULL,
  sample_contains = NULL,
  sample_not_contains = NULL,
  sample_equal_to = NULL,
  variable_set = NULL,
  variable_unset = NULL,
  variable_equal_to = NULL,
  variable_not_equal_to = NULL,
  variable_greater_than = NULL,
  variable_less_than = NULL,
  include_vehicle = TRUE,
  frequency = NULL,
  experiment = NULL,
  instrument = NULL,
  max_deviation = NULL,
  subsample = NULL,
  return_lists = FALSE,
  sampleid = NULL,
  remake_name = TRUE
)

Arguments

data.df

Vascr dataset to subset

time

Specified times. Individual values in a list will be subset out. If vectors are present in the list, values between the two most extreme values will be returned.

unit

Units to subset. These are checked for integrity against possible units and the dataset itself

well

Wells to select

value_greater_than

Select lines where the value is greater than a certain value

value_less_than

Select lines where the value is less than a certain value

value_equal_to

Select lines where the value is equal to a certain value

sample_contains

Return lines where the sample contains a particular value

sample_not_contains

Return lines where theh sample does not contain particular values

sample_equal_to

Return lines when the sample exactly matches a particular string

variable_set

Vector of variables. Lines will be returned if a variable is set.

variable_unset

Vector of variables. Lines will be returned if a variable is not set.

variable_equal_to

Vector of pairs of variables and values. Rows will be returned where each variable matches the value following it.

variable_not_equal_to

Vector of pairs of variables and values. Rows will be returned where each selected variable does not match the value following it.

variable_greater_than

Vector of pairs of variables and values. Rows will be returned where each selected variable is larger than value following it.

variable_less_than

Vector of pairs of variables and values. Rows will be returned where each selected variable is less than value following it.

include_vehicle

Should all relevant vehicle control wells be included in the dataset.

frequency

Frequencies to include in the dataset.

experiment

Experiments to include in the dataset. Can be addressed either by name, or by the numerical order that they were loaded into vascr_combine in

instrument

Which instruments to include values from

max_deviation

Maximum deviation to allow between replicates

subsample

Frequency values shoud be subsampled to

return_lists

Return lists of the variables to select rather than the subset data set

sampleid

List of ID's to be used. Sample names will be re-ordered accordingly for display.

remake_name

Should the name be re-formatted

Value

The subset dataset, based on the values selected

Examples

# vascr_subset(growth.df)
# vascr_subset(growth.df, time = 40)
# vascr_subset(growth.df, time = NULL)
 
# vascr_subset(growth.df, unit = "Rb")
# vascr_subset(growth.df, unit = "R")
# vascr_subset(growth.df, well = "A1")
# vascr_subset(growth.df, value_less_than = 100)
# vascr_subset(growth.df, max_deviation = 10)

# vascr_subset(growth.df, time = c(5,20))

vascr_subset(growth.df, unit = "Rb")


JamesHucklesby/vascr documentation built on April 30, 2024, 8:33 a.m.