Last data update: 2014.03.03

R: Function that reads the microdata file of household members...
epf.2011.miembrosR Documentation

Function that reads the microdata file of household members belonging to the household budget survey provided by the INE.

Description

This function reads the microdata file for household members statistics, as collected by the INE in Spain. It was originally built using the metadata for the 2011 file and may work with microdata files for other yearly submissions.

Usage

epf.2011.miembros(file)

Arguments

file

The name of the file of household members microdata file.

Details

This function reads microdadata files for households members statistics collected by the Spanish Statistical Office, INE. The survey data can be downloaded from http://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736176806&menu=resultados&secc=1254736195147&idp=1254735976608

It has been built and tested on the 2011 files and may be able to read files conforming to later formats.

Value

A data.set, a data structure defined in the memisc package.

Author(s)

Diego Paniagua S<c3><83><c2><a1>nchez

References

http://www.ine.es/metodologia/t25/t2530p458.pdf

Examples

# This command reads a few lines sampled from the members household EPF file for 2011
sample.Epfmiembros2011 <- epf.2011.miembros(system.file( "extdata",
                                                      "sample_miembros_a2011.txt",
                                                      package = "MicroDatosEs") )
summary(as.data.frame(sample.Epfmiembros2011))

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/epf.2011.miembros.Rd_%03d_medium.png", width=480, height=480)
> ### Name: epf.2011.miembros
> ### Title: Function that reads the microdata file of household members
> ###   belonging to the household budget survey provided by the INE.
> ### Aliases: epf.2011.miembros
> ### Keywords: manip
> 
> ### ** Examples
> 
> # This command reads a few lines sampled from the members household EPF file for 2011
> sample.Epfmiembros2011 <- epf.2011.miembros(system.file( "extdata",
+                                                       "sample_miembros_a2011.txt",
+                                                       package = "MicroDatosEs") )
Error in `$<-.data.frame`(`*tmp*`, "valor", value = """") : 
  replacement has 1 row, data has 0
Calls: epf.2011.miembros -> 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/epf_2011_miembros_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/epf_2011_miembros_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/epf_2011_miembros_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/epf_2011_miembros_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/epf_2011_miembros_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/epf_2011_miembros_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/epf_2011_miembros_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/epf_2011_miembros_mdat2.txt'
Execution halted