View source: R/check_format_names.R
check_format_names | R Documentation |
This function checks that the TDLM's inputs have the required format (and names).
check_format_names(vectors, matrices = NULL, check = "format_and_names")
vectors |
A |
matrices |
A |
check |
A |
The TDLM
's inputs should be based on the same number of
locations sorted in the same order. check = "format"
will run basic checks
to ensure that the structure of the inputs (dimensions, class, type...) is
correct.
It is recommended to use the location ID as vector
names
, matrix
rownames
, and matrix
colnames
. Set check = "format_and_names"
to
check the inputs' names. The checks are run successively, so run the function
as many times as needed to get the message indicating that the inputs passed
the check successfully.
A message indicating if the check has passed or failed.
Maxime Lenormand (maxime.lenormand@inrae.fr)
data(mass)
data(distance)
mi <- as.numeric(mass[, 1])
names(mi) <- rownames(mass)
mj <- mi
check_format_names(
vectors = list(mi = mi, mj = mj),
matrices = list(distance = distance),
check = "format_and_names"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.