rtry_remove_col {rtry}R Documentation

Remove columns

Description

This function removes specified columns from the imported data for further processing.

Usage

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

Arguments

input

Input data frame or data table.

...

Names of columns to be removed separated by commas. The operator : can be used for selecting a range of consecutive variables.

showOverview

Default TRUE displays the dimension of the remaining data.

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_select_col

Examples

# Remove certain columns from the provided sample data (data_TRY_15160)
data_rm_col <- rtry_remove_col(data_TRY_15160,
                 LastName, FirstName, DatasetID, Dataset, SpeciesName,
                 OrigUncertaintyStr, UncertaintyName, Replicates,
                 RelUncertaintyPercent, Reference, V28)

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

[Package rtry version 1.1.0 Index]