Reads microdata using user provided metadata files

Share:

Description

This function reads a microdata file based on metadata provided by the user. It is particularly intended for the user to test the metadata before submitting it for inclusion in the package.

Usage

1
test.metadata(file, md.1, md.2, encoding = "UTF-8" )

Arguments

file

The name of the microdata file

md.1

First metadata file

md.2

Second metadata file

encoding

Either 'latin1' or 'UTF-8', the encoding used in the metadata files

Details

The function reads the microdata file using three standardized metadata files. For some microdata files, the package provides the required metadata files; however, users may be willing to load other microdata files using the package infrastructure or test metadata files before providing them to the maintainer for inclusion in it.

Value

A data.frame.

Author(s)

Carlos J. Gil Bellosta

Examples

1
2
3
4
5
# This command reads a few lines sampled from 
# the EPA for 2011Q1
x <- test.metadata(system.file("extdata", "sampleEPA0111.txt", package = "MicroDatosEs"),
                   system.file("metadata", "epa_mdat1.txt", package = "MicroDatosEs"),
                   system.file("metadata", "epa_mdat2.txt", package = "MicroDatosEs"))