Internal function to convert a distantia data frame into a matrix.
Arguments
- df
(required, data frame) data frame typically resulting from
distantia()
, but others are accepted as long as the columnsx
,y
, andvalue
are available. Default: NULL- x
(required, character string) Name of the column with the names of the matrix columns. Default: "x"
- y
(required, character string) Name of the column with the names of the matrix rows. Default: "y"
- value
(required, character string) Name of the column with values.
See also
Other internal:
utils_boxplot_common()
,
utils_check_args_distantia()
,
utils_check_args_matrix()
,
utils_check_args_path()
,
utils_check_args_tsl()
,
utils_check_args_zoo()
,
utils_check_distance_args()
,
utils_check_list_class()
,
utils_clean_names()
,
utils_digits()
,
utils_distantia_df_split()
,
utils_prepare_df()
,
utils_prepare_matrix()
,
utils_prepare_matrix_list()
,
utils_prepare_time()
,
utils_prepare_vector_list()
,
utils_prepare_zoo_list()
,
utils_tsl_pairs()
Examples
tsl <- tsl_simulate(
n = 3,
time_range = c(
"2010-01-01 12:00:25",
"2024-12-31 11:15:45"
)
)
df <- distantia(
tsl = tsl
)
m <- utils_distantia_df_to_matrix(
df = df
)
m
#> A B C
#> A 0.000000 3.408875 4.133979
#> B 3.408875 0.000000 4.781276
#> C 4.133979 4.781276 0.000000