rtry_select_anc | R Documentation |
This function selects one specified ancillary data together with the ObservationID
from the imported data and transforms it into a wide table format for further processing.
rtry_select_anc(input, ..., showOverview = TRUE)
input |
Input data frame or data table. |
... |
The IDs of the ancillary data ( |
showOverview |
Default |
An object of the same type as the input data.
This function makes use of the subset
and distinct
functions
within the base
and dplyr
packages respectively. It also uses the functions
rtry_select_col
and rtry_remove_col
, as well as the function
rtry_join_outer
to select and combine the extracted ancillary data with the ObservationID
.
# Obtain a list of ObservationID and the corresponding ancillary data of interest
# using the specified DataID (e.g. DataID 60 for longitude and 59 for latitude) from
# the provided sample data (e.g. data_TRY_15160)
georef <- rtry_select_anc(data_TRY_15160, 60, 59)
# Expected message:
# dim: 98 3
# col: ObservationID Longitude Latitude
# Obtain a list of ObservationID and one corresponding ancillary data of interest
# using the specified DataID (e.g. DataID 61 for altitude) from the provided sample
# data (e.g. data_TRY_15160)
alt <- rtry_select_anc(data_TRY_15160, 61)
# Expected message:
# dim: 23 2
# col: ObservationID Altitude
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.