similar to: read.spss (package foreign) and character columns

Displaying 20 results from an estimated 4000 matches similar to: "read.spss (package foreign) and character columns"

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
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
2008 Feb 13
2
apply on large arrays
I have a big contingency table, approximately of size 60*2*500*500, and I need to count the number of cells containing a count of 1 for each of the factors values defining the first dimension. Here is my attempt: tab1<-with(pisa1,table(CNT,GENDER,ISCOF,ISCOM)) tab2<-apply(tab1,1:4,function(x)ifelse(sum(x)==1,1,0)) tab3<-apply(tab2,1,sum) Computing tab2 is very slow. Is there a faster
2010 Jul 25
1
Left Outer Join 2 DF's on Multiple Conditions
Hi, I am trying to execute the following SQL statement using two data frames: tab1, tab2 : Two Tables Select tab1.*, tab2.*, tab1.tobiiTime - tab2.ruiTime as timeDiff, IFNULL(n-m, -9999999) as alwaysIncrement FROM tab1 LEFT OUTER JOIN tab2 On tab1.data1 - tab2.mouseX = 0 And tab1.data2 - tab2.mouseY = 0 I am trying to do the following in R:- *#Getting error here:* data
2013 Apr 10
6
means in tables
Hi. I have 2 tables, with same dimensions (8000 x 5). Something like: tab1: V1 V2 V3 V4 V5 14.23 1.71 2.43 15.6 127 13.20 1.78 2.14 11.2 100 13.16 2.36 2.67 18.6 101 14.37 1.95 2.50 16.8 113 13.24 2.59 2.87 21.0 118 tab2: V1 V2 V3 V4 V5 1.23 1.1 2.3 1.6 17 1.20 1.8 2.4 1.2 10 1.16 2.6 2.7 1.6 11 1.37 1.5 2.0 1.8 13 1.24 2.9 2.7 2.0 18 I need generate a table of averages, the
2010 Oct 28
2
replace text at certain positions in a file
Hello, I am working with R version 2.10.1 under windows. In a text file, I need to replace all characters at certain column positions with blanks. For example, say the file contains two lines and looks like this: ab34cd78e fg3 hi78j I'd like to replace everything at positions 3-4 and 7-8 with blanks, so the output should be: ab cd e fg hi j [I'm not sure if this is really an R
2006 Oct 27
3
How to best divide table by table
Hi all, how can I divide two tables of the same dimension so that all names are preserved, ie do not become NA? I have "tab1" and "tab2", each having names in the first column. I want "tab3" with the same names and values "tab1/tab2". Thanks, Serguei
2010 Apr 24
2
table command
Hi, Let s be a dataframe. > s A B C 0 0 1 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 > tab1=table(s[,c(1,2)]) > tab1 B A 0 1 0 3 3 1 3 0 > tab2=table(s[,c(1,3)]) > tab2 C A 1 0 6 1 3 The problem is I need to access frequency corresponding to (0,0). tab1[1] will give me the correct value
2011 Oct 29
1
Refresh tab content on click in JQuery UI Tabs
HI Guy''s TAB1 and TAB2 have some radio button, checkbox and dropdown menu. When TAB1 is selected, I have to switch to TAB2 and then back to TAB1 to refresh the loaded content. How to make TAB1 refresh loaded content when click on its tab? *code is something like that* <ul class="tabs"> <li><a *href="#tab1"*>Gallery</a></li>
2009 Dec 22
2
Nested For loops
Dear R experts, Might be very simple question to ask but would be insightful. As the same story of nested "for loops". following is the code that I am using to get the autocorrelation function of the sample data. I have tried to get rid of for loops but since I am touching R after such a long time that I need to practice more but I need help to revive my skills. I know that apply() or
2009 Aug 06
1
calasification table under conditions
hi, i have a file with 49000 lines i want to do a classification in two tables suppose data <- read.csv2("c:/total.csv", sep=",") if the second colonne contains ( A,B,C,D)------------> tab1 if the second colonne contains ( E,F,G,H)------------> tab2 How can do this ? Thank you for your help [[alternative HTML version deleted]]
2005 Jun 24
1
comparing strength of association instead of strength of evidence?
Hi, I asked this question before, which was hidden in a bunch of questions. I repharse it here and hope I can get some help this time: I have 2 contingency tables which have the same group variable Y. I want to compare the strength of association between X1/Y and X2/Y. I am not sure if comparing p-values IS the way even though the probability of seeing such "weird" observation under H0
2011 Nov 26
1
data.table merge equivalent for all.x
Een ingesloten tekst met niet-gespecificeerde tekenset is gescrubt ... Naam: niet beschikbaar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111126/e14d6638/attachment.pl>
2003 Jul 09
2
RODBC and Oracle: error "table does not exist"
Dear r-helpers! I have trouble reading data from an Oracle data base using RODBC Version 1.0-3, R Version 1.7.1, Windows XP, Oracle8 ODBC Driver Version 8.1.6.4.0: > library(RODBC) > channel <- odbcConnect(dsn="PAV32", case="oracle", believeNRows=FALSE) > # ok, this was succesful > x <- sqlTables(channel) > x[37, ] TABLE_CAT TABLE_SCHEM TABLE_NAME
2009 Sep 02
4
within: order of newly added variables
Dear R community, I am using function 'within' in R.2.9.1 to add variables to an existing data.frame. This works wonderful, except for one minor point: The new variables are added to the data in reverse order. For example: x <- data.frame(a = 1:3, b = 4:6) y <- within(x, { c = a^2 d = b^2 e = c+d } ) gives a b e d c 1 1 4 17 16 1 2 2 5 29 25 4 3 3 6 45 36 9
2005 Nov 15
1
latex table and R codes
Dear R-help assistance; may you help me regrding to following inquiry!? you know what, i have generated three tables by xtable R function, right now i am trying to make a single table by putting these tables togethere; actully i am going to come upt with *.tex (latex) file. because i have more extera non-R material, i am using Sweave to read R instructions, and finally i hope to end up with a
1997 May 11
2
R-alpha: Logarithmic scales
Here are another three problems with logarithmic scales: 1) segments() does not work with logarithmic scales. I suggest to change lines 962-973 in "plot.c": for (i = 0; i < n; i++) { if (FINITE(xt(x0[i%nx0])) && FINITE(yt(y0[i%ny0])) && FINITE(xt(x1[i%nx1])) && FINITE(yt(y1[i%ny1]))) { GP->col = INTEGER(col)[i % ncol];
2003 May 14
2
number of patients in a hospital on a given date
Dear R-users! I am using R 1.7.0, under Windows XP. Having some hospital discharge data (admission date and discharge date for each patient), I want to get the number of patients in the hospital on a given date. My data look like (simple example): > x <- data.frame(patid=c("pat1", "pat2"), adm.date = c("15.03.2002", "16.03.2002"),
2002 Jun 12
2
data mining: finding association rules
Dear R-users! I would like to search for "association rules" (and compute support and confidence, for example) in a data set, and wonder if this can be done with R (version 1.5.0 for Windows)? Particulary, I wonder if a) anyone has done something like that with R or b)maybe someone has written an R-interface to some existing algorithm/software (e.g. to something like the
2007 Jan 27
5
Prototype not processing javascript
I''m trying to change over from Rails 1.1.6 to 1.2.1 and have discovered that either something is wrong with Prototype of else something has changed that I am not aware of and cannot find documentation on. (I just joined this group, so if this has already been cussed and discussed here or in another list then please point me in the right direction.) I am trying to use the