sorder_data: Sort and order a dataframe to be used for the heatmap

View source: R/sorder_data.R

sorder_dataR Documentation

Sort and order a dataframe to be used for the heatmap

Description

Sort and/or order a dataframe to be used for the heatmap (will be the "datasorted" variable).

Usage

sorder_data(data, data2, year = NULL, n_camp, heat_sort, add_annot)

Arguments

data

The main dataframe with "Provincia" and other information columns (use data()).

data2

The second dataframe that has to be sorted and joined with data. (e.g. datapolind()). Data must has "Codice_azienda", "Azienda" "N_campionamento", and "Anno" and nothing more (NO Provincia or Cultivar or ID_foglie). So only those 3 char columns and all double columns (polifenols.

year

Data will be filtered by "Anno" (e.g. "2020"). The default is NULL (data will not be filtered by year but only by n_camp).

n_camp

Data will be filtered by "N_campionamento" (e.g. "R2").

heat_sort

Option for ordering data (TRUE or FALSE).

add_annot

A column used for the annotation (e.g. "Provincia").

Examples

## Not run: 
sorder_data(
data2 = datapolind(),
year = input$selyearheatind,
n_camp = input$numheat,
heat_sort = input$heatsort,
add_annot = input$selectannot
)

## End(Not run)



ShinyFabio/OliveHealthR2 documentation built on Oct. 18, 2024, 2:22 a.m.