View source: R/select_forcis_columns.R
select_forcis_columns | R Documentation |
Selects columns in FORCIS data. Because FORCIS data contains more than 100
columns, this function can be used to lighten the data.frame
to easily
handle it and to speed up some computations.
select_forcis_columns(data, cols = NULL)
data |
a |
cols |
a |
A data.frame
.
# Attach the package ----
library("forcis")
# Import example dataset ----
file_name <- system.file(file.path("extdata", "FORCIS_net_sample.csv"),
package = "forcis")
net_data <- read.table(file_name, dec = ".", sep = ";")
# Add 'data_type' column ----
net_data$"data_type" <- "Net"
# Dimensions of the data.frame ----
dim(net_data)
# Select a taxonomy ----
net_data <- select_taxonomy(net_data, taxonomy = "VT")
# Dimensions of the data.frame ----
dim(net_data)
# Select only required columns (and taxa) ----
net_data <- select_forcis_columns(net_data)
# Dimensions of the data.frame ----
dim(net_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.