Skip to contents padding-top: 70px;

Removes all points from an exdf object that satisfy a set of conditions.

Usage

remove_points(exdf_obj, ...)

Arguments

exdf_obj

An exdf object.

...

Each optional argument should be a list of named elements that specify points to be removed from exdf_obj. For example, list(species = 'soybean', plot = c('1a', '1b')) specifies the set of points where (1) species is 'soybean' and (2) plot is '1a' or '1b'.

Value

An exdf object formed from exdf_obj by removing all rows that meet the conditions specified by the optional input arguments.

See also

Examples

# Create an exdf object by reading a Licor Excel file
licor_file <- read_gasex_file(
  PhotoGEA_example_file_path('ball_berry_1.xlsx')
)

# Print the number of points in the data set
nrow(licor_file)
#> [1] 28

# Remove the following:
# - All points where `obs` is 28 (1 point)
# - All points where `species` is `soybean` and `plot` is `1a` or `1b` (14 points)
licor_file <- remove_points(
  licor_file,
  list(obs = 28),
  list(species = 'soybean', plot = c('1a', '1b'))
)

# There should now be 15 fewer points remaining in the data set
nrow(licor_file)
#> [1] 13