Description Usage Arguments Details
View source: R/load-random-forest-data.R
If reformat = TRUE a "brute force" reformat is performed to match each longitude and latitude value to those in the reference dataframe reference_df.
1 2 3 |
df_list |
a list of dplyr dataframes. For each dataframe in the list, longitude and latitude will be fixed. |
reference_df |
a reference dataframe that must contain at least longitude and latitude. A dataframe. |
variable |
variable to be used in the reformatting process. The values of this variable will be reordered according to the new longitude and latitude values. Character. |
reformat |
Should lon and lat be fixed from scratch? Boolean. |
shift |
Should lon and lat be shifted? Boolean. |
lon_lat_names |
name of longitude and latitude variables. A character vector. Example: by default lon_lat_names = c("lon", "lat") |
shift_amount |
a named list of two numbers. If longitude and latitude should be shifted, by how much should they be shifted? By default shift_amount is set to NULL. If shift amount is set to NULL, longitude and latitude in the dataframe are replaced by longitude and latitude in the reference dataframe. If you need to shift longitude and latitude by a fixed amount, simply set the argument shift amount like this: list(lon = 1, lat = 2). In this case, longitude is shifted by adding 1 unit and latitude is shifted by adding 2 units. Note that shift_amount is a list with specific names. |
If shift = TRUE the values of longitude and latitude will be shifted. By default, longitude and latitude are assumed to be shifted by a negligible amount and replaced with those in the reference dataframe. If this is not the case, you can add the shift_amount argument to set the amount of the shifting.
If both reformat and shift are set to FALSE, the df_list is simply returned without any changes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.