Last data update: 2014.03.03

R: Reads microdata for the EPA as provided by the INE
epa2005R Documentation

Reads microdata for the EPA as provided by the INE

Description

This function reads the microdata file for the "Encuesta de Poblaci'on Activa", EPA, survey in Spain.

Usage

epa2005( epa.file )

Arguments

epa.file

The name of the microdata file

Details

This function reads microdadata files for the quarterly Encuesta de Poblaci'oon Activa survey by the Spanish Statistical Office, INE. The survey data can be downloaded from http://www.ine.es/prodyser/micro_epa.htm.

It can only read the files for the surveys from 2005 onwards. Previous files have a different, non compatible, format.

Value

A dataframe.

Author(s)

Carlos J. Gil Bellosta

References

http://www.ine.es/prodyser/micro_epa.htm

Examples

# This command reads a few lines sampled from the EPA for the 1Q 2011
sample.epa.data <- epa2005(system.file( "extdata", "sampleEPA0111.txt", package = "MicroDatosEs") )

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MicroDatosEs)
Loading required package: memisc
Loading required package: lattice
Loading required package: MASS

Attaching package: 'memisc'

The following objects are masked from 'package:stats':

    contr.sum, contr.treatment, contrasts

The following object is masked from 'package:base':

    as.array

Loading required package: Hmisc
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:memisc':

    %nin%, html

The following objects are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MicroDatosEs/epa2005.Rd_%03d_medium.png", width=480, height=480)
> ### Name: epa2005
> ### Title: Reads microdata for the EPA as provided by the INE
> ### Aliases: epa2005
> ### Keywords: manip
> 
> ### ** Examples
> 
> # This command reads a few lines sampled from the EPA for the 1Q 2011
> sample.epa.data <- epa2005(system.file( "extdata", "sampleEPA0111.txt", package = "MicroDatosEs") )
Error in `$<-.data.frame`(`*tmp*`, "valor", value = """") : 
  replacement has 1 row, data has 0
Calls: epa2005 -> create.spss.vals -> $<- -> $<-.data.frame
In addition: Warning messages:
1: In read.table(file.start.end, header = T, sep = "\t", ...) :
  invalid input found on input connection '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/epa_mdat1.txt'
2: In read.table(file.start.end, header = T, sep = "\t", ...) :
  incomplete final line found by readTableHeader on '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/epa_mdat1.txt'
3: In read.table(file.type, header = T, sep = "\t", ...) :
  invalid input found on input connection '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/epa_mdat2.txt'
4: In read.table(file.type, header = T, sep = "\t", ...) :
  incomplete final line found by readTableHeader on '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/epa_mdat2.txt'
5: In read.table(file, header = T, sep = "\t", ...) :
  invalid input found on input connection '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/epa_mdat1.txt'
6: In read.table(file, header = T, sep = "\t", ...) :
  incomplete final line found by readTableHeader on '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/epa_mdat1.txt'
7: In read.table(file, header = T, sep = "\t", ...) :
  invalid input found on input connection '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/epa_mdat2.txt'
8: In read.table(file, header = T, sep = "\t", ...) :
  incomplete final line found by readTableHeader on '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/epa_mdat2.txt'
Execution halted