dataFrameSortDS {dsBase}R Documentation

dataFrameSortDS called by ds.dataFrameSort

Description

The serverside function that sorts a data frame using a specified sort key.

Usage

dataFrameSortDS(df.text = NULL, sort.key.text = NULL,
  sort.descending = FALSE, sort.alphabetic = FALSE,
  sort.numeric = FALSE)

Arguments

df.text

a character string providing the name for the data.frame to be sorted. This corresponds to the argument <df.name> in ds.dataFrameSort

sort.key.text

a character string providing the name for the sort key. This corresponds to the argument <sort.key.name> in ds.dataFrameSort

sort.descending

logical, if TRUE the data.frame will be sorted by the sort key in descending order. Default = FALSE (sort order ascending)

sort.alphabetic

logical, if TRUE the sort key is treated as if alphabetic Default=FALSE.

sort.numeric

logical, if TRUE the sort key is treated as if numeric Default=FALSE. The arguments <sort.alphabetic> and <sort.numeric> are both derived directly from the corresponding arguments specified in ds.dataFrameSort If both sort.alphabetic and sort.numeric are FALSE, the sort.key will interpreted naturally: as numeric if it is numeric, otherwise as alphabetic ie as if it is a vector of character strings.

Details

A data frame is a list of variables all with the same number of rows, which is of class 'data.frame'. For details of numeric and alphabetic sorting and how ds.dataFrameSort/dataFrameSortDS jointly operate, please see help for ds.dataFrameSort.

Value

the appropriately re-sorted data.frame will be written to the serverside R environmnet as a data.frame named according to the <newobj> argument in ds.dataFrameSortDS (or with default name <df.name>.sorted where <df.name> is the first argument of ds.dataFrameSortDS)

Author(s)

DataSHIELD Development Team


[Package dsBase version 5.0.0 ]