inspect_data() scans a data frame for specific errors that may affect the use of functions in respR.

inspect_data(
  df,
  time = NULL,
  oxygen = NULL,
  inflow.o2 = NULL,
  outflow.o2 = NULL,
  highlight = TRUE,
  plot = TRUE
)

Arguments

df

data frame. Accepts data frame object of any size.

time

numeric. Defaults to NULL. This is the time data.

oxygen

numeric. Defaults to NULL. This is the dissolved oxygen data.

inflow.o2

numeric. Defaults to NULL. This is inflow oxygen data. Used only for flowthrough respirometry data.

outflow.o2

numeric. Defaults to NULL. This is outflow oxygen data. Used only for flowthrough respirometry data.

highlight

logical. Defaults to TRUE. Prints location (row #) of errors detected by the function.

plot

logical. Defaults to TRUE. Produces plots for quick visual diagnostics.

Value

A list object of class adjust_rate.

Details

PLEASE NOTE: the inspect_data function is deprecated. It will not be updated, and will be removed in a future update to respR. Please use the new inspect function instead.

Data checks include:

  • A test for NA/NaN inputs. * A test for numeric data. * A test for sequential time data. * A test for duplicate time data. * A test for evenly-spaced time data.

Once data checks are complete, the function produces a list object which may be directly loaded into calc_rate(), calc_rate.bg(), calc_rate.ft(), and auto_rate() for further analyses.

Examples

data("sardine.rd")
#> Warning: data set ‘sardine.rd’ not found
inspect_data(sardine.rd)
#> Error in inspect_data(sardine.rd): could not find function "inspect_data"
data("urchins.rd")
#> Warning: data set ‘urchins.rd’ not found
inspect_data(urchins.rd, 1, 5, highlight = FALSE)
#> Error in inspect_data(urchins.rd, 1, 5, highlight = FALSE): could not find function "inspect_data"