Learn R Programming

antaresRead (version 2.1.0)

showAliases: show aliases for variables

Description

show aliases for variables

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.

showAliases lists available aliases

Usage

showAliases(names = NULL)

setAlias(name, desc, 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.

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

Run this code
# NOT RUN {
# Display the short description of an alias
showAliases()

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

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

Run the code above in your browser using DataLab