similar to: SPSS variable lables import

Displaying 20 results from an estimated 1000 matches similar to: "SPSS variable lables import"

2007 Apr 29
2
impossible to open SPSS file
Hi, I try to import a SPSS file with foreign but don't succeed. I looked into the help pages but find no answer. The file has been produced with SPSS 15 but I got the same error with a file in SPSS portable format. mydata<-read.spss("C:\Rdata\ESS1_ICT.SAV") Erreur dans read.spss("C:RdataESS1_ICT.SAV") : impossible d'ouvrir le fichier I guess the error is
2001 Nov 28
2
Value lables, variable lables
I'm looking for an analogy to SPSS and "variable lable" and "value lable" in R. I have a copy of S+4.0 and can't find any info in their docs, and don't find it in R-intro either. In SPSS, for each variable, there is a name like VAR001 and a variable lable (a longer descriptive string) like Respondent ID and for many of the values of other variables there are
2006 Jul 06
2
questions on data management
Dear friends, suppose i have two datasets: A and B A: id<-1:6 x<-c(1,2,3,4,5,6) y<-c(2,4,6,8,3,2) xy<-data.frame(id,x,y) B m<-c(1,1,3,3,5,5) n<-c(2,2,6,6,3,3) mn<-data.frame(m,n) Now, i want to perfomr two tasks: 1. get a subset of B,no duplicate values,: C: m n 1 2 3 6 5 3 2.Extract the values in A on the conditions that x=m and y=n the results should be: id x y 1 1 2 3
2006 Jul 18
2
A contingency table of counts by case
Here is an example of the data.frame that I have, df<-data.frame("case"=rep(1:5,each=9),"id"=rep(1:9,times=5),"x"=round(runif(length(rep(1:5,each=9))))) "case" represents the cases, "id" the persons, and "x" is the binary state. I would like to know in how many cases any two persons a. both have "1", b. the first has
2006 Sep 26
2
Vectorise a for loop?
Hi R guru coders I wrote a bit of code to add a new column onto a "topTable" dataframe. That is a list of genes processed using the limma package. I used a for loop but I kept feeling there was a better way using a more vector oriented approach. I looked at several commands such as "apply", "by" etc but could not find a good way to do it. I have this feeling there
2009 Mar 08
1
re shaping a data frame with multiple IDs
Dear R-experts, I have the following "long" data frame: ID <-
2006 May 03
1
Breaking a matrix into parts
Hi, I've a matrix in 20*11 order. There are 11 variables, i.e 11 columns and each variable have 20 row data. Now i want to calculate covariance between any variable with others taking 4 rows at a time, so that there will be 5 blocks. How can i do this using any R-function? If i want to do it in any 'loop' function? Thanks a lot, SB.
2006 May 03
3
Giving Error
I tried your code, but it's giving the following error.. Error in match.fun(FUN) : argument "FUN" is missing, with no default
2006 May 11
2
Break Matrix
Hi All, I have a (331*12) matrix. I wan t to braek it into 28 parts each window having 12 rows, so that each matrix become (12*12) matrix. How can i do this. Thanks, Sumanta. --------------------------------- Send instant messages to your online friends - NOW [[alternative HTML version deleted]]
2006 May 18
1
Function (x) as consecutive values
Hi - I'm trying to avoid using a 'for' loop due to inefficiency and instead use a function (and ultimately tapply as I'm working on a matrix) but I can't figure out how to get 'function' to take the variables as anything other than vectors for example aa<-0 x<-1:4 test.fun<-function(x) {aa<-(x*x +aa) return(aa)} test.fun(1:4) This code
2006 Jun 13
1
plotting gaussian data
Ok I guess it's time to ask. So I want to plot my data. It's my data from a frequency table, "temp". My formula is just a Gaussian eq. I have done the nls function to get my parameters and now I want to do the whole plot (...) and then lines(..) This is what I have done. > temp bin x 1 -4.0 0 2 -3.9 0 3 -3.8 0 4 -3.7 0 5 -3.6 0 6 -3.5 0 .... and so
2006 Jul 10
1
How to include NA's of a factor in table?
Dear All, Is there a better way to include NA's of a factor in the output of table() than using as.character()? Admittedly, I do not understand the help page for table concerning the exclude argument applied to factors. I tried in different ways, but could not get NA to be included in the table, if not using as.character() (see example). Greetings, Heinz ## example fcv <-
2006 Jul 11
1
Table of P values for Fisher's exact test
Hi, I have a table of observed counts for various genetic markers. Instead of doing Fisher's exact test for each marker one at a time and recording the P value manually, is there a script to go through the whole list and generate the P value column automatically? An example of my data: Counts_CHB and Counts_AA are the observed counts for one allele. 2N_CHB and 2N_AA are the total number
2006 Jul 13
2
simple question about variables....
Dear R users, I have a simple question on variable manipulation. Imagine I have an object "OBJ" that has "toto" as one of its variables. I would like to understand why if I do > varname <- "toto" >OBJ$varname returns no results whereas > OBJ[varname] returns the column entitled
2006 Jul 13
1
Problems plotting a function defined as a product
In order to define a function f as: > f <- function(x) (x+1)*(x+2) I want to use the notation: > v = c(1,2) > g <- function(x) prod((v+x)) That apparently works and, for instance, the loop: >for (i in 1:100) { print(f(i)-g(i)) } Produces a sequence of zeros. Nevertheless, if I try to plot the function g by: >t = seq(0,100,1) >plot(t,g(t),type="l") I
2006 Jul 13
3
colors on graph
Hy all, I need to draw something in 2 dimension that has 3 dimension, the choice has been made to use colors to display the third dimension into the graph. Has someone done something like that, i can't figure out how to parametize the colors. Thks for all ideas, COMTE Guillaume [[alternative HTML version deleted]]
2006 Jul 20
1
hist or barplot
Hi all, I wish to draw 2 hist (or barplot) on the same graph. I can do it simply by using par(new=TRUE) , but it overlap with the first drawn, how to tell R to put in front of the graph the min value of the two graph in order for it to be seen and don't hide each other. I've been looking at help for barplot or hist but didn't find anything... (or my english is too poor to
2006 Jul 31
2
Problem with allp ossible combination.
Dear R Users, Suppose I have a dataset like this: a b 39700 485.00 39300 485.00 39100 480.00 38800 487.00 38800 492.00 39300 507.00 39500 493.00 39400 494.00 39500 494.00 39100 494.00 39200 490.00 Now I want get a-b for all possible combinations of a and b. Using two 'for' loop it is easy to calculate. But problem arises when row length of the data set is
2006 Aug 02
1
questions on aggregate data
Dear friends, my question is how to aggregate dataset and the inverse manipulation. e.g.My dataset data structure1: x 1 1 2 3 3 data structure2: x freq 1 2 2 1 3 2 Then how to generate dataset2 from dataset1 and generate dataset1 from dataset2? e.g. dataset2 from dataset1 : x<-c(1,1,2,3,3) a<-tab(x) as.data.frame(a) *But i can't do the inverse manipulation:generate dataset1 from
2006 Aug 02
2
missing value
Hi all # I have this data set and how can I assign NA?s in just one command ? And why the summary(dat) function preserves the value 9 as real. ? x <- c(1,2,3,9,4) y <- c(3,6,9,2,3) z <- c(9,9,2,2,8) w <- c(6,5,3,0,9) dat <- cbind(x,y,z,w) summary(dat) x[x==9] <- NA y[y==9] <- NA z[z==9] <- NA w[w==9] <- NA summary(dat) summary(x) summary(y) summary(z) summary(w)