Re: [R] A 'sweave' strange problem !!!

2005-11-12 Thread Berwin A Turlach
G'day Stéphane, SD == Stéphane Dray [EMAIL PROTECTED] writes: SD I have found a problem (bug?) with Sweave. [...] The value SD of 'a' has change between the two Schunks. It seems that the SD problem only appear when there are plot (fig=T) in the first SD one. Without plot,

[R] Updating in attempt to rotate ylab

2005-11-12 Thread Michael Kubovy
What am I doing wrong? (please cc me when replying) yy - 1:10 xx - yy*2 xYplot(yy~xx,ylab=) #this plots as it should text(.4,5,expression(paste(log, frac(p(b),p(a)) ))) Error in text.default(0.4, 13, expression(paste(log, frac(p(b), p (a) : plot.new has not been called yet This is

Re: [R] no package 'Matrix' at the repositories

2005-11-12 Thread Uwe Ligges
Spencer Graves wrote: Thank you all for your replies and for all your hard work to make R what it is. The wise course for me is probably to use R 2.1.1 when I need the Matrix package until this issue gets fixed. No, you can use R-2.2.0, but simply use the last working version of

Re: [R] sibling list element reference during list definition

2005-11-12 Thread Adaikalavan Ramasamy
It would be more interesting to ask why does this does not work. mylist - list( value=5, plusplus = mylist$value + 1 ) I think this is because plusplus cannot be evaluated because mylist does not exist and mylist cannot be created until plusplus is evaluated. There are people on this list

Re: [R] sibling list element reference during list definition

2005-11-12 Thread Gabor Grothendieck
You can do this: L - list(value = 2) L$plusplus - L$value + 1 or use the proto package which does support this sort of manipulation: library(proto) as.list(proto(,{value = 2; plusplus = value+1})) That creates a proto object with the indicated two components and then converts it to

Re: [R] Updating in attempt to rotate ylab

2005-11-12 Thread Deepayan Sarkar
On 11/12/05, Michael Kubovy [EMAIL PROTECTED] wrote: What am I doing wrong? (please cc me when replying) yy - 1:10 xx - yy*2 xYplot(yy~xx,ylab=) #this plots as it should text(.4,5,expression(paste(log, frac(p(b),p(a)) ))) Error in text.default(0.4, 13, expression(paste(log, frac(p(b), p

[R] matrix subset

2005-11-12 Thread vincent
Dear R-helpers, I apologize for this certainly simple question. I have the following R lines : m = matrix(1:12 , 3 , 4); m [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 m1 = subset(m , m[,2]=5); m1 [1] 2 3 5 6 8 9 11 12 but

Re: [R] matrix subset

2005-11-12 Thread Kristel Joossens
Do you mean simply m[m[,2]=5,] ? Kristel [EMAIL PROTECTED] wrote: Dear R-helpers, I apologize for this certainly simple question. I have the following R lines : m = matrix(1:12 , 3 , 4); m [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]3

Re: [R] matrix subset

2005-11-12 Thread Marc Schwartz
On Sat, 2005-11-12 at 20:24 +0100, [EMAIL PROTECTED] wrote: Dear R-helpers, I apologize for this certainly simple question. I have the following R lines : m = matrix(1:12 , 3 , 4); m [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369

Re: [R] matrix subset

2005-11-12 Thread vincent
Marc Schwartz a écrit : What version of R are you using? You did not indicate this in your post as you are asked to do in the posting guide. I apologize for that, I use Version 2.0.1 In R version 2.1.0, a matrix method was added to the subset() function, so I am guessing that you are

Re: [R] matrix subset

2005-11-12 Thread vincent
Kristel Joossens a écrit : Do you mean simply m[m[,2]=5,] ? yes. Arghh !!! Thanks to all of you for your helpful answers. Vincent __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] how to make automatically each level from data.frame to vector

2005-11-12 Thread Muhammad Subianto
Dear R-helpers, Suppose I have dataset like this below: data(HairEyeColor) dfHEC - as.data.frame(as.table(HairEyeColor)) my.dfHEC - data.frame(Hair=rep(dfHEC$Hair,dfHEC$Freq), Eye=rep(dfHEC$Eye,dfHEC$Freq), Sex=rep(dfHEC$Sex,dfHEC$Freq)) my.dfHEC

Re: [R] how to make automatically each level from data.frame to vector

2005-11-12 Thread Francisco J. Zagmutt
Looking at the results that you are expecing I think that you just want to have only the record from black colored people. If that't the case, for this dataset the easiest way is to subset the data i.e data(HairEyeColor) x=as.data.frame(HairEyeColor) x2=x[x$Hair==Black,1:3] x2 Hair Eye

[R] Error message in polr

2005-11-12 Thread german . lopez
Dear members of the list, I'm fitting ordinal regressions using polr, and in some models I get the error copied below. Dependent variable is an ordered factor of bird abundance categories, and predictors are continuous habitat variables. ro6 - polr(formula = abun ~ InOmbrot + Oliva.OC +

[R] computation on a table

2005-11-12 Thread Claus Atzenbeck
Hello, I have a table (1) of the form q1 q3 q4 q8 q9 A 5 2 0 1 3 B 2 0 2 4 4 I have another table (2): q1 q2 q3 q4 q5 q6 q7 q8 q9 C 10 7 4 2 6 9 3 1 2 I would like to divide the numbers in table (1) by the number of the appropriate column in table

Re: [R] computation on a table

2005-11-12 Thread jim holtman
This will work if you are using matrices (if you have data frames, convert them to matrix): table1 q1 q3 q4 q8 q9 A 5 2 0 1 3 B 2 0 2 4 4 table2 q1 q2 q3 q4 q5 q6 q7 q8 q9 C 10 7 4 2 6 9 3 1 2 index - match(colnames(table2), colnames(table1), nomatch=0) t(t(table1[,index]) / table2[index !=

Re: [R] computation on a table

2005-11-12 Thread Peter Dalgaard
jim holtman [EMAIL PROTECTED] writes: This will work if you are using matrices (if you have data frames, convert them to matrix): table1 q1 q3 q4 q8 q9 A 5 2 0 1 3 B 2 0 2 4 4 table2 q1 q2 q3 q4 q5 q6 q7 q8 q9 C 10 7 4 2 6 9 3 1 2 index - match(colnames(table2), colnames(table1),

[R] voronoi

2005-11-12 Thread Robert
Is there any pure r code to do delaunay or voronoi diagrams? Thanks! - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] assign values

2005-11-12 Thread Robert
Any difference between - and = to assign the values? - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] assign values

2005-11-12 Thread Gabor Grothendieck
- can be used in places where = but otherwise they are the same. See ?- On 11/13/05, Robert [EMAIL PROTECTED] wrote: Any difference between - and = to assign the values? - [[alternative HTML version deleted]]

Re: [R] assign values

2005-11-12 Thread Gabor Grothendieck
Sorry, I meant to say - can be used in places where = can't. Seem to have left out the word can't. On 11/13/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: - can be used in places where = but otherwise they are the same. See ?- On 11/13/05, Robert [EMAIL PROTECTED] wrote: Any difference