What Is the Next Non-Null Data Point?
Source:R/find_next_good_datapoint.R
find_next_good_datapoint.Rd
What Is the Next Non-Null Data Point?
Arguments
- data_row
A numeric vector representing the data row.
- index
The index of the current data point.
- n_replicates
The total number of replicates (length of the row)
Details
Given a data row, an index, and the number of replicates (the number of elements in the row), this function finds the next good data point in the row.
A good data point is a non-missing value (not NA) with a non-empty string.
Examples
data_row <- c(NA, 3, 2, NA, 5)
index <- 1
n_replicates <- 5
find_next_good_datapoint(data_row, index, n_replicates) # expect 3
#> [1] 3