[R] [Related Topic] need help on read.spss
Matt Shotwell
matt at biostatmatt.com
Thu Oct 13 18:28:44 CEST 2011
Would it be worthwhile to update the read.spss implementation using the
more recent discoveries from the PSPP group? I don't mean to copy their
code; but to use the ideas in their code. Is anyone working on this? I
wouldn't want the effort to be duplicated.
On Thu, 2011-10-13 at 16:22 +0200, Uwe Ligges wrote:
>
> On 11.10.2011 12:07, Smart Guy wrote:
> > Hi,
> > I have one doubt about one of the parameter of 'read.spss()' from
> > 'foreign' package.
> > Here is the syntax :-
> >
> > read.spss ( file,
> > use.value.labels = TRUE,
> > to.data.frame = FALSE,
> > max.value.labels = Inf,
> > trim.factor.names = FALSE,
> > trim_values = TRUE,
> > reencode = NA,
> > use.missings = to.data.frame )
> >
> >
> > In above syntax when I pass *'to.data.frame= FALSE*' it gives me missing
> > values from SPSS file (that I try to read using read.spss() ). But when I
> > pass '*to.data.frame = TRUE*' then its not giving me missing values. And
> > need to get missing values.
> >
> > According to read.spss() documentation
> >
> > *to.data.frame : return a data frame?*
> >
> > I am curious to know, if we pass *'to.data.frame = TRUE*' , is it going to
> > cause some issue or effect something? I didn't understand the read.spss()
> > documentation correctly.
> > Please explain.
> >
> > Thanks in Advance
> >
>
> An R data.frame cannot represent different kinds of missing values,
> since R just has "NA". Therefore, there are two way to import data:
>
> to.data.frame=FALSE will read all the information, but into a format
> you will likely have to postprocess to make it conveniently usable.
>
> to.data.frame=TRUE will import into a data.frame, but that cannot
> represent all the nuances known from the SPSS representation.
>
> Uwe Ligges
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list