R: Reads microdata for the EES as provided by the INE
ees2010
R Documentation
Reads microdata for the EES as provided by the INE
Description
This function reads the microdata file for the "Encuesta de Estructura Salarial", ESS, survey in Spain.
Usage
ees2010(ees.file)
Arguments
ees.file
The name of the microdata file
Details
This function reads microdadata files for the "Encuesta de Estructura Salarial" survey by
the Spanish Statistical Office, INE.
The survey data can be downloaded from http://www.ine.es/prodyser/micro_epa.htm.
It can read the files for the 2010 survey. It might work for microdata from previous surveys (1995, 2002, 2006).
Value
A data.set. This class is defined in package memisc. Most users will want to transform the output to a regular data.frame using function as.data.frame.
Author(s)
Carlos J. Gil Bellosta, with major contributions from Jos'e Luis Ca~nadas Reche.
# This command reads a few lines sampled from an EES file
x <- ees2010(system.file("extdata", "sampleEES2010.txt", package = "MicroDatosEs"))
summary(as.data.frame(x))
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/ees2010.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ees2010
> ### Title: Reads microdata for the EES as provided by the INE
> ### Aliases: ees2010
> ### Keywords: manip
>
> ### ** Examples
>
> # This command reads a few lines sampled from an EES file
> x <- ees2010(system.file("extdata", "sampleEES2010.txt", package = "MicroDatosEs"))
Error in spss.fixed.file(file = ees.file, columns.file = file.column, :
undefined variables in 'codes.file'
Calls: ees2010 -> spss.fixed.file
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/ees_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/ees_mdat1.txt'
3: In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
invalid input found on input connection '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/ees_mdat2.txt'
4: In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
EOF within quoted string
5: In read.table(file, header = T, sep = "\t", ...) :
invalid input found on input connection '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/ees_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/ees_mdat1.txt'
7: In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
invalid input found on input connection '/home/ddbj/local/lib64/R/library/MicroDatosEs/metadata/ees_mdat2.txt'
8: In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
EOF within quoted string
Execution halted