setAlias: show aliases for variables

Description Usage Arguments Value Examples

View source: R/showAliases.R

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.

showAliases lists available aliases

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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()

## End(Not run)

antaresRead documentation built on Feb. 13, 2019, 5:04 p.m.