SCM

SCM Repository

[microdataes] View of /pkg/R/defun2011.R
ViewVC logotype

View of /pkg/R/defun2011.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22 - (download) (annotate)
Sat Aug 2 12:54:49 2014 UTC (5 years, 2 months ago) by cjgb
File size: 1208 byte(s)
Fixed encoding issues
###################################################################
# cjgb
# 20120811
# Reads the INE deaths microdata in its 2011 (tested) version
#	It could possibly also read microdata files for other years
###################################################################

defun2011 <- function( file ){
  
  file.column  <- create.spss.column(system.file( "metadata", "defun_2011_mdat1.txt", package = "MicroDatosEs" ), 
                                     system.file( "metadata", "defun_2011_mdat2.txt", package = "MicroDatosEs" ), fileEncoding = "UTF-8")
  file.var     <- create.spss.var(system.file( "metadata", "defun_2011_mdat1.txt", package = "MicroDatosEs" ), fileEncoding = "UTF-8")
  file.vals    <- create.spss.vals(system.file( "metadata", "defun_2011_mdat2.txt", package = "MicroDatosEs" ), fileEncoding = "UTF-8")
  file.missing <- system.file( "metadata", "defun_2011_mdat3.txt", package = "MicroDatosEs" )
  
  defun2011 <- spss.fixed.file( 
                  file = file,
                  columns.file = file.column,
                  varlab.file = file.var,
                  missval.file = file.missing,
                  codes.file  = file.vals )
  
  as.data.set(defun2011)
}


root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge