find_next_good_datapoint {profrep} | R Documentation |
What Is the Next Non-Null Data Point?
Description
What Is the Next Non-Null Data Point?
Usage
find_next_good_datapoint(data_row, index, n_replicates)
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.
Value
The next good data point or -999 if none is found.
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
[Package profrep version 1.0.0 Index]