setAlias: show aliases for variables

View source: R/showAliases.R

showAliasesR Documentation

show aliases for variables

Description

Aliases are short names that can be used in the select parameter in function readAntares to tell the function which columns and/or type of data to import.

setAlias can be used to create a new alias. It can be especially useful for package developers to help their users select the data required by their packages.

getAlias return character vector containing columns and/or types of data

showAliases lists available aliases

Usage

showAliases(names = NULL)

setAlias(name, desc, select)

getAlias(name)

Arguments

names

optional vector of alias names. If provided, the full list of columns selected by these aliases is displayed. Else only the name and a short description of all aliases is displayed.

name

Alias name

desc

Short description indicating why the new alias is interesting

select

character vector containing columns and/or types of data to import.

Value

setAlias is only used for its side effects. A data.frame with columns 'name', 'desc' and 'select'. showAliases invisibly returns a data.frame with columns "name", "desc" and "select".

Examples


# Display the short description of an alias
showAliases()

# Display the full description of an alias
showAliases("renewable")

getAlias("renewable")

## Not run: 
# Create a new alias that imports flows
setAlias("test", "short description", c("links", "FLOW LIN.")) 
showAliases()

## End(Not run)


rte-antares-rpackage/antaresRead documentation built on Oct. 18, 2024, 7:49 a.m.