Closed christianqz closed 7 months ago
Hi @christianqz. it seems that it is not an issue of the function but of the data. From the error message from your screenshot, there is already a column "region" (19th column) in the data data_sorted
. The function is trying to assign "region" again but duplicated names are not allowed, therefore, it will rename it, which will invalidate the check for successful assign of "region.
You should check why your data already has a column named "region" but there is a simple workaround:
data_geo <-
data_sorted %>%
dplyr::select(-region) %>%
RFossilpol::geo_assign_by_list(
data_source = .,
dir = current_dir, # [config criteria]
optional_info_to_assign = optional_info_to_assign
)
Thank you Ondrej! I also used a different shapefile and saved it in the Input - spatial data, and worked perfectly after that
var name "region" from the shapefile "Regions" in the input data from the workflow, is not being recognized
In the Merge_datasets.R section in the line :
I get the following message:
✖ WARNING: Selected file does not contains value: region
For the "optional_info_to_assign", I used the shapefile folder "Regions_shapefile" from the Data input of the workflow. It seems to recognize everything except the var name and I tried using "REGION", "Region" for variable but none of them is being recognized. I opened ARCGIS to actually see the right spelling and it looks like it is just "region" . But when I run the example of biomes, I dont have any problem. I have to say, I switch: sf::sf_use_s2(FALSE) before running the code.
To Reproduce
data_geo <- RFossilpol::geo_assign_by_list( data_source = data_sorted, dir = current_dir, # [config criteria] optional_info_to_assign = optional_info_to_assign )