rtry_bind_col {rtry} | R Documentation |
Bind data by columns
Description
This function takes a list of data frames or data tables and combines them by columns. The data have to have the same number and sequence of rows.
Usage
rtry_bind_col(..., showOverview = TRUE)
Arguments
... |
A list of data frames or data tables to be combined by columns. |
showOverview |
Default |
Value
An object of the same type as the first input.
Note
A common attribute is not necessary (difference to the function rtry_join_left
and rtry_join_outer
):
the binding process simply puts the data side-by-side.
References
This function makes use of the bind_cols
function within the dplyr
package.
See Also
rtry_bind_row
, rtry_join_left
, rtry_join_outer
Examples
# Assuming a user has selected different columns as separated data tables
# and later on would like to combine them as one for further processing.
data1 <- rtry_select_col(data_TRY_15160,
ObsDataID, ObservationID, AccSpeciesID, AccSpeciesName, ValueKindName,
TraitID, TraitName, DataID, DataName, OrigObsDataID, ErrorRisk, Comment)
data2 <- rtry_select_col(data_TRY_15160,
OriglName, OrigValueStr, OrigUnitStr, StdValue, UnitName)
data <- rtry_bind_col(data1, data2)
# Expected messages:
# dim: 1782 12
# col: ObsDataID ObservationID AccSpeciesID AccSpeciesName ValueKindName TraitID
# TraitName DataID DataName OrigObsDataID ErrorRisk Comment
#
# dim: 1782 5
# col: OriglName OrigValueStr OrigUnitStr StdValue UnitName
#
# dim: 1782 17
# col: ObsDataID ObservationID AccSpeciesID AccSpeciesName ValueKindName TraitID
# TraitName DataID DataName OrigObsDataID ErrorRisk Comment OriglName
# OrigValueStr OrigUnitStr StdValue UnitName
[Package rtry version 1.1.0 Index]