Learn R Programming

antaresRead (version 2.2.95)

showAliases: 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)

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".

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.

Examples

Run this code

# Display the short description of an alias
showAliases()

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

getAlias("renewable")

if (FALSE) {
# Create a new alias that imports flows
setAlias("test", "short description", c("links", "FLOW LIN.")) 
showAliases()
}

Run the code above in your browser using DataLab