rtry_explore {rtry} | R Documentation |
Explore data
Description
This function takes a data frame or data table and converts it into a grouped data frame of unique values
based on the specified column names. A column (Count
) is added, which shows the number of records
within each group. The data are grouped by the first attribute if not specified with the argument sortBy
.
Usage
rtry_explore(input, ..., sortBy = "", showOverview = TRUE)
Arguments
input |
Data frame or data table, e.g. from |
... |
Attribute names to group together. |
sortBy |
(Optional) Default |
showOverview |
Default |
Value
A data frame of unique values grouped and sorted by the specified attribute(s).
References
This function makes use of the group_by
, summarise
and arrange
functions within the dplyr
package.
Examples
# Explore the unique values in the provided sample data (data_TRY_15160)
# based on the attributes AccSpeciesID, AccSpeciesName, TraitID, TraitName, DataID
# and DataName, sorted by TraitID
data_explore <- rtry_explore(data_TRY_15160,
AccSpeciesID, AccSpeciesName, TraitID, TraitName, DataID, DataName,
sortBy = TraitID)
# Expected message:
# dim: 235 7
# Learn more applications of the explore function via the vignette (Workflow for
# general data preprocessing using rtry): vignette("rtry-workflow-general").