similar to: change in read.spss, package foreing?

Displaying 20 results from an estimated 30000 matches similar to: "change in read.spss, package foreing?"

2008 Nov 06
3
Umlaut read from csv-file
Dear All! Reading character strings containing an "umlaut" from a csv-file I find a (to me) surprising behaviour in R 2.8.0, that I did not notice in R 2.7.2. A comparison by "==" results in FALSE, while grep does find the aggreement. See the example below. The crucial line is x=="div 1-2 Ver?nderungen", with the result [1] FALSE in R 2.8.0 but [1] TRUE in R
2012 Apr 12
3
Reading SPSS: underlying numerical codes
Dear people, I have got a question concerning the underlying numerical codes when reading an SPSS file into R. I used the package foreign and when I look at a variable I get the verbal codes. I would like to know how it is possible to get the underlying numerical codes as output, which are the same as in my SPSS file. Thank you very much in advance for your help! Marion [[alternative HTML
2006 May 23
4
How to call a value labels attribute?
Dear All, after searching on CRAN I got the impression that there is no standard way in R to label values of a numerical variable. Since this would be useful for me I intend to create such an attribute, at the moment for my personal use. Still I would like to choose a name which does not conflict with names of commonly used attributes. Would value.labels or vallabs create conflicts? The
2004 Nov 30
6
How to know if a bug was recognised
Hello! A problem with special characters seemed to me to be a bug. I sent a mail to R-windows at r-project.org concerning the problem (see below). How can I find out, if this is considered as a bug or an error of myself? Which part of FAQs or documentation did I miss to find the answer? thanks in advance Heinz T??chler -------------------- copy of abovementioned mail ---------- to: R-windows
2009 Feb 17
2
spss-file problem with foreign 0.8-32
Hi, after updating to foreign version 0.8-32, I experienced the following error when I tried to load a SPSS file: Fehler in inherits(x, "factor") : objekt "cp" nicht gefunden Zus?tzlich: Warning message: In read.spss("***l.sav", use.value.labels = TRUE, to.data.frame = TRUE) : ***.sav: File-indicated character representation code (1252) looks like a Windows
2007 Apr 05
1
read.spss (package foreign) and SPSS 15.0 files
Hello, does anyone have experience with reading SPSS Version 15.0 files into R (version 2.4.1, WinXP)? I have long been sucessfully reading SPSS files with read.spss from the wonderful foreign package, but somehow after upgrading from SPSS14 to SPSS15 I seem to have problems. Trying a simple example, where test.sav is a SPSS 15.0 data file consisting of x1=c(1,2,3) and
2006 Feb 19
2
Converting factors back to numbers. Trouble with SPSS import data
I'm using Fedora Core 4, R-2.2. The basic question is: can one recover the numerical values used in SPSS after importing data into R with read.spss from the foreign library? Here's why I ask. My colleague sent an SPSS data set. I must replicate some results she calculated in SPSS and one problem is that the numbers used in SPSS for variable values are not easily recovered in R. I'm
2005 Feb 04
5
How to access results of survival analysis
Hello, it seems that the main results of survival analysis with package survival are shown only as side effects of the print method. If I compute e.g. a Kaplan-Meier estimate by > km.survdur<-survfit(s.survdur) then I can simply print the results by > km.survdur Call: survfit(formula = s.survdur) n events median 0.95LCL 0.95UCL 100.0 58.0 46.8 41.0 79.3 Is
2005 Apr 02
4
factor to numeric in data.frame
Dear All, Assume I have a data.frame that contains also factors and I would like to get another data.frame containing the factors as numeric vectors, to apply functions like sapply(..., median) on them. I read the warning concerning as.numeric or unclass, but in my case this makes sense, because the factor levels are properly ordered. I can do it, if I write for each single column
2005 Aug 10
5
how to write assignment form of function
Dear All, where can I find information about how to write an assigment form of a function? For curiosity I tried to write a different form of the levels()-function, since the original method for factor deletes all other attributes of a factor. Of course, the simple method would be to use instead of levels(x) <- newlevels, attr(x, 'levels') <- newlevels. I tried the following: ##
2008 Apr 15
2
How can I import user-defined missings from Spss?
Hi, It works for me to import spss datasets via library(foreign) with read.spss or via library Hmisc by (spss.get). But no matter which way I do import the data, user-defined missings from Spss are always lost. (it makes no difference if there are a single value, a range, or any combination of them. They are always ignored). Is there any way in R to find out if any value was user-defined missing
2006 May 24
3
How to make attributes persist after indexing?
Dear All! For descriptive purposes I would like to add attributes to objects. These attributes should be kept, even if by indexing only part of the object is used. I noted that some attributes like levels and class of a factor exist also after indexing, while others, like comment or label vanish. Is there a way to make an arbitrary attribute to be kept after indexing? This would be especially
2004 Nov 06
3
foreign(read.spss) in rw2000 and re2001beta
I encountered something strange with read.spss (package foreign, version 0.7 with R2.0.0 and version 0.8 with R2.0.1 beta, windows XP) I made a test file test.sav with SPSS version 11.5.1 containing only one numeric variable, with a value label for one value not occuring in the file. According to ?read.spss this should result in a factor, but it results in all NA. Using the argument
2004 Nov 30
1
Attn Heinz Tuechler: Re: problem with special characters (ä,ö,ü)
[I tried to send this message privately, but the return address bounced.] I think this has been fixed in R-patched, but I doubt if the fix has been tested in Win98. Could you please download a copy from <http://cran.r-project.org/bin/windows/base/rpatched.html> and confirm that it has been fixed? Duncan Murdoch On Sat, 27 Nov 2004 23:31:23 +0100, Heinz Tuechler <tuechler at gmx.at>
2010 Jan 12
1
read.spss: option "to.data.frame" and string variables
Dear R-users, I am using R version 2.10.1 and package foreign version 0.8-39 under windows. When reading .sav-Files (PASW Statistics 18.0.1) containing string variables, these are automatically converted to factors when using option "to.data.frame = TRUE" (see example below). It's clear to me why this happens (the default behaviour of a call to as.data.frame). But this is not
2007 Sep 05
1
(PR#9896) read.spss converts string variables with
------=_20070905112441_38848 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit I am sending two files attached. The file problem_file.sav was saved in SPSS 10.0. It contains variables of various types, with and without labeling etc., so that you can make experiments. The file problem_file_read.RData was saved in R 2.5.1 (foreign library version 0.8-20). It
2009 Oct 10
7
SPSS long variable names
Hello guys I am new to this list and for R too. I am wondering if there is a patch for the SPSS reading code on the foreign package, in order to be able to read long variable names. Right now read.spss() just trunc the names to 8 characters. Or if someone could help me on other way: I have to process everyday a lot of SPSS Syntax Files and Dat files that come from one system that can only export
2005 Feb 17
5
Again: Variable names in functions
Hello, still I have difficulties with variable names in functions. I know the famous example form help for deparse/substitute but I will give a simpler one to explain my problem. I know from Reid Huntsinger (Tue, 8 Feb 2005 12:39:32 -0500) that: "Semantically, R is pass-by-value, so you don't really have the names, just the values. In implementation, though, R *does* pass names, in part
2004 Mar 12
6
read.spss
Hi, I would like to read a spss file in R. When i type read.spss("...") Comes the error: couldn't find function "read.spss" What shall i do? Margarida [[alternative HTML version deleted]]
2009 Mar 03
1
SPSS data import: problems & work arounds for GSS surveys
I'm using R 2.8.1 on Ubuntu 8.10. I'm writing partly to ask what's wrong, partly to tell other users who search that there is a work around. The General Social Survey is a long standing series of surveys provided by NORC (National Opinion Research Center). I have downloaded some years of the survey data in SPSS format (here's the site: