getAgeMethod.Rd
Each age read will have an associated age method. This function will attempt to find what ageing method was used for the age thought to represent the best estimate of the age of the otolith.
getAgeMethod(Pdata, verbose = TRUE)
A data frame of biological samples
originating from the
Pacific Fishieries Information Network (PacFIN) data warehouse,
which originated in 2014. Data are pulled using sql calls, see
PullBDS.PacFIN()
.
A logical specifying if output should be written to the
screen or not. Good for testing and exploring your data but can be turned
off when output indicates information that you already know. The printing
of output to the screen does not affect any of the returned objects. The
default is to always print to the screen, i.e., verbose = TRUE
.
A vector of characters.
When more than one age estimate matches what is thought to be the best age, then the ageing methods for all ages that match the best age will be returned as a single entry separated by "–". Most often, double reads are performed using the same method but there are cases, e.g., CARE exchanges or research questions on differences between methods, when a single otolith is read using multiple methods. For example, some petrale sole otoliths were read using both surface and break and burn reads.
data <- data.frame(
age1 = 1:10,
age2 = 10,
AGE_METHOD1 = "B",
AGE_METHOD2 = "S",
FINAL_FISH_AGE_IN_YEARS = 10
)
getAgeMethod(data)
#> `getAgeMethod()` summary information -
#> ℹ Age methods were originally coded to ‘B’ or ‘S’
#> ℹ Age methods are now coded to B--S (n = 1), S (n = 9) and NA (n = 0)
#> ℹ Number of samples (n) per combinations of ageing methods
#> AGE_METHOD1 AGE_METHOD2 Age method for best age n
#> 1 B S B--S 1
#> 2 B S S 9
#> [1] "S" "S" "S" "S" "S" "S" "S" "S" "S" "B--S"
# [1] "S" "S" "S" "S" "S" "S" "S" "S" "S" "B--S"