rtry_select_col {rtry}R Documentation

Select columns

Description

This function selects the specified columns from the input data.

Usage

rtry_select_col(input, ..., showOverview = TRUE)

Arguments

input

Input data frame or data table.

...

Column names to be selected.

showOverview

Default TRUE displays the dimension and column names of the selected columns.

Value

An object of the same type as the input data.

References

This function makes use of the select function within the dplyr package.

See Also

rtry_remove_col

Examples

# Select certain columns from the provided sample data (data_TRY_15160)
data_selected <- rtry_select_col(data_TRY_15160,
                   ObsDataID, ObservationID, AccSpeciesID, AccSpeciesName,
                   ValueKindName, TraitID, TraitName, DataID, DataName, OriglName,
                   OrigValueStr, OrigUnitStr, StdValue, UnitName, OrigObsDataID,
                   ErrorRisk, Comment)

# Expected message:
# dim:   1782 17
# col:   ObsDataID ObservationID AccSpeciesID AccSpeciesName ValueKindName TraitID
#        TraitName DataID DataName OriglName OrigValueStr OrigUnitStr StdValue
#        UnitName OrigObsDataID ErrorRisk Comment

[Package rtry version 1.1.0 Index]