Open SimonDedman opened 1 month ago
Regarding this: would be especially good to have more info on id.col. Because I'm using a spatial object not csv, I have to use actel=FALSE, and thus specify everything else, which feels like a bit of a waste of the coding you've done in the backend.
Anyway, having done so, I've tried various things to solve a later warning that Colnames & rownames don't match due to Xs (colnames were 1 2 3 converted by R to X1 X2 X3 but then they don't match rownames which are 1 2 3):
id.col = Station.name,
Error: object 'Station.name' not found
id.col = spatial$Station.name,
Error: Please provide only one column name in 'id.col'
id.col = "Station.name",
Error in
.rowNamesDF<-
(x, value = value) : invalid 'row.names' length
spatial <- spatial |> dplyr::mutate(Station.name = stringr::str_replace_all(string = Station.name, pattern = " ", replacement = "_"))
id.col = "Station.name",
Error in
.rowNamesDF<-
(x, value = value) : invalid 'row.names' length
And finally, old faithful:
colnames(distances) <- spatial$Station.name
rownames(distances) <- spatial$Station.name
Would be nice for users to have a guide for how to do this, given I expect a standard workflow will be to create objects in order, following the manual. And therefore to have all objects in the environment. Example: