rtry_select_anc {rtry} | R Documentation |
Select ancillary data in wide table format
Description
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.
Usage
rtry_select_anc(input, ..., showOverview = TRUE)
Arguments
input |
Input data frame or data table. |
... |
The IDs of the ancillary data ( |
showOverview |
Default |
Value
An object of the same type as the input data.
References
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
.
Examples
# 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
[Package rtry version 1.1.0 Index]