Description Usage Arguments Value See Also Examples
View source: R/INExmlToSchema.R
xmlToSchema
is a constructor of the class StfwfSchema.
This constructor reads an xml file containing totally the schema of the fixed-width file to read.
This file contains a root node named Schema
, a secondary root node named Variables
and one node var
for each variable of the Schema who has the following child nodes:
variable
: the name of the variable.
width
: the number of positions which the values of this variable occupy in the
fwf file.
initialPos
: initial position of the field which the values of this variable
occupy in the fwf file.
finalPos
: final position of the field which the values of this variable occupy in
the fwf file.
type
: type of the variable. It must be either log
, integer
,
num
or char
.
valueRegEx
: regular expression for the values of this variable.
description
: textual description of the variable.
1 | INExmlToSchema(xmlName = NULL, xmlSchema = NULL)
|
xmlName |
Path of the xml file containing the schema. |
xmlSchema |
Object of class |
Return an object of class StfwfSchema.
1 2 | xmlName <- file.path(system.file('extdata', package = 'fastReadfwf'), 'dr_EESEadulto_2020.xml')
output <- INExmlToSchema(xmlName)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.