RepoXLSToVNC: Produce an object of class 'VNC' from an xls file

Description Usage Arguments Value Examples

View source: R/RepoXLSToVNC.R

Description

This function is a constructor for the class VNC using the contents of a xls file.

RepoXLSToVNC transforms the content of a xls file into an object of class VNC.

This function internally builds a list whose components are data.table with a row per each variable and with the columns: IDQual, NonIDQual, IDDD and Unit1. These internal data.table are then used to initialize a VNC object.

The column IDQual contains the names of unit qualifiers.

The column NonIDQual contains the names of variable names qualifiers.

The column IDDD contains the names of variables.

The column Unit1 specifies the variable names used by production Unit1

Usage

1
RepoXLSToVNC(ExcelName, SheetNames)

Arguments

ExcelName

Character vector of length 1 with the name of the file to read.The file will be read from the working directory (see getwd) unless the full path is specified.

SheetNames

Character vector with the names of the sheets in the file to read.

Value

Object of class VNC.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# We assume that the xlsx file \code{ExampleXLS.NombresVariables.xlsx} with the appropriate 
# structure is in the administrator desktop (change accordingly otherwise):
ExcelName <- 'T:/E30163/E30163.NombresVariables_V1.xlsx'
VNC <- RepoXLSToVNC(ExcelName)
show(VNC)

## End(Not run)

david-salgado/RepoReadWrite documentation built on Oct. 3, 2021, 1:09 p.m.