Re: [R] Is this mailing list available on/as a news group?

2007-11-11 Thread Martin Waller
Gabor Grothendieck wrote: Try: http://news.gmane.org/gmane.comp.lang.r.general Fantastic - perfect. Saves my inbox filling up! Thanks Martin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Removing dendrogram nodes with 2 members

2007-11-11 Thread Jesse D Lecy
Greetings, I have a large dendrogram that I would like to use to extract groups. But any group with 2 or fewer members is not useful to me, so I would like to remove all of the nodes with less than 3 members from the dendrogram. 1) Is there a good way to iterate through a dendrogram list to

Re: [R] attribing frequency of levels to each matrix cell

2007-11-11 Thread David Winsemius
It worked. But this student of R is left wondering why or how. In particular the construction foo[.][.] was puzzling. I doubt that matters greatly, but I am using R in both a Mac (OSX 10.2 v 2.0.1) and WinXP (v 2.4.1.) I have broken it into what I think are its pieces: table(my.mat)[-1]

Re: [R] Produce graph that looks nice on screen and on paper

2007-11-11 Thread Deepayan Sarkar
On Nov 8, 2007 11:22 AM, Van Campenhout Bjorn [EMAIL PROTECTED] wrote: On 11/6/07, Van Campenhout Bjorn [EMAIL PROTECTED] wrote: Hi all, I made a dotplot() with lattice, which comes out nice on the graphics device. I can save this as a eps using postscript() and include this in

Re: [R] Removing axes / frame from plot()

2007-11-11 Thread Duncan Murdoch
On 11/11/2007 11:49 AM, Alex Park wrote: R Help Feel sure there is a simple answer to this but answer has eluded me so far. NB. Using R 2.6.0. I am plotting a simple chart using plot(): plot(df, ylim=c(as.numeric(min(df)), as.numeric(max(df))), col=OliveDrab, xlab=, ylab=) What I

Re: [R] Multivariate time series

2007-11-11 Thread Frank Schmid
You may want to have a look at the vars package Frank Giusy schrieb: Hello to everyone! I have a question for you..I need to predict multivariate time series, for example sales of 2 products related one to the other, having the 2 prices like inputs.. Is there in R a function to do it? I saw

Re: [R] attribing frequency of levels to each matrix cell

2007-11-11 Thread Gabor Grothendieck
On Nov 11, 2007 11:23 AM, David Winsemius [EMAIL PROTECTED] wrote: It worked. But this student of R is left wondering why or how. In particular the construction foo[.][.] was puzzling. I doubt that matters greatly, but I am using R in both a Mac (OSX 10.2 v 2.0.1) and WinXP (v 2.4.1.) I have

[R] State-space model estimation with EM

2007-11-11 Thread adschai
Hi - I follow some references and now implement my own state-space model estimation. I have a question. In case, my equations are like this: y(t) = Ax(t)+Bu(t)+eps(t) # observation eq x(t) = Cx(t-1)+Du(t)+eta(t) # state eq Using EM, after backward recursion, you will use the smoothed state

Re: [R] How to more efficently read in a big matrix

2007-11-11 Thread affy snp
Hi Gabor, I replaced multiple spaces with a single one and tried the code you suggested. I got: library(sqldf) Loading required package: RSQLite Loading required package: DBI Loading required package: gsubfn Loading required package: proto

[R] Non-crossing Nonparametric quantile regressions

2007-11-11 Thread paulbegc
I've been looking for ways to calculate a large number (100) of non-crossing Nonparametric quantile regressions on large populations (1000+). Can the quantreg package in R ensure the non-crossing property? If not, do you know any alternative? Thank you, Paulbegc -- View this message in

Re: [R] Multivariate integration with infinite limits

2007-11-11 Thread Rolf Turner
On 11/11/2007, at 1:43 AM, Uwe Ligges wrote: Paul Smith wrote: Dear All, Can R perform multivariate integration with infinite limits of integration? No, R does numerical (not symbolical) calculations, hence it can never perform integration (not even univariate) with infinite limits.

Re: [R] interpretation for multiple regression

2007-11-11 Thread Rolf Turner
On 10/11/2007, at 3:48 AM, Irene Mantzouni wrote: Dear all, probably this is quite clear for most of you but for me it is a headache... I am regressing response A against the continuous covariate B and the relationship is clearly quadratic. When I add a second covariate B, the

[R] using RSperl with tree package

2007-11-11 Thread Rachana Jain
Hello, I am trying to use the tree package in R with RSperl. I have generated a regression tree using the tree package in R and saved it in a file say RegTree_2.Rdata If I use the predict function from R command line, it works fine. However, I want to use it from within perl using RSperl. To

[R] using RSperl with tree package

2007-11-11 Thread rachanaj
Hello, I am trying to use the tree package in R with RSperl. I have generated a regression tree using the tree package in R and saved it in a file say RegTree_2.Rdata If I use the predict function from R command line, it works fine. However, I want to use it from within perl using RSperl. To

[R] how to emerge two tables by taking the ave.

2007-11-11 Thread affy snp
Dear list, I am new to R and very inexperienced. Sorry for the trouble. I have two txt files and want to merge them by taking the average. More specifically, for example, the txt file1, with row names and column names, consists of 238000 rows and 196 columns. Each column corresponds to a sample.

Re: [R] How to more efficently read in a big matrix

2007-11-11 Thread Gabor Grothendieck
On Nov 11, 2007 2:28 PM, affy snp [EMAIL PROTECTED] wrote: Hi Gabor, I replaced multiple spaces with a single one and tried the code you suggested. I got: library(sqldf) Loading required package: RSQLite Loading required package: DBI Loading required package: gsubfn Loading required

Re: [R] using RSperl with tree package

2007-11-11 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rachana Jain wrote: Hello, I am trying to use the tree package in R with RSperl. I have generated a regression tree using the tree package in R and saved it in a file say RegTree_2.Rdata If I use the predict function from R command line,

Re: [R] Largest N Values Efficiently?

2007-11-11 Thread Gabor Grothendieck
You can apply 1:n to order(x) so you don't wind up subscripting x by every element in order(x). o - head(order(x), n) # positions x[o] A completely different approach, if X is a data frame with d as a data column is this where the row names give the positions (don't know about speed):

[R] how to run a linux syntax within an R script?

2007-11-11 Thread Christian Salas
Is it possible to run a linux syntax (i.e. like i was at a linux terminal) from an R code? Just one example: Let say that I have an R code with hist(rnorm(100)) dev.copy2eps(file=Dnormal.eps) and then within the same R code, i want to convert the file 'Dnormal.eps' to 'Dnormal.pdf'. This can

Re: [R] how to run a linux syntax within an R script?

2007-11-11 Thread Rolf Turner
?system On 12/11/2007, at 2:28 PM, Christian Salas wrote: Is it possible to run a linux syntax (i.e. like i was at a linux terminal) from an R code? Just one example: Let say that I have an R code with hist(rnorm(100)) dev.copy2eps(file=Dnormal.eps) and then within the same R code, i

Re: [R] how to emerge two tables by taking the ave.

2007-11-11 Thread affy snp
Hi,Jim. I created two txt files as: x.txt id b1 b2 b3 a1 246 a2 12 NA a3 46 NA y.txt idb1 b2 b3 a1 NA44 a2 22 NA a3 122 I tried it one more time but got different z: x-read.table(file=x.txt,header=TRUE,row.names=1,na.strings = NA)

Re: [R] how to emerge two tables by taking the ave.

2007-11-11 Thread jim holtman
Here is the way to read the data and convert it. Your data was a dataframe with the first column being the id: x - read.table(textConnection(id b1 b2 b3 + a1 246 + a2 12 NA + a3 46 NA), header=TRUE) y - read.table(textConnection(idb1 b2 b3 + a1 NA44 + a2

Re: [R] graphical parameters and acf

2007-11-11 Thread Gabor Grothendieck
Try this: par(mfrow = 1:2) acf(cbind( = 1:10)) acf(cbind( = 1:10)) par(mfrow=c(1,1)) par(mfrow=c(1,1), oma=c(0,0,1,0)) mtext(My Title, 3, outer = TRUE, cex = par(cex.main)) Please provide reproducible code next time as requested in last line of every message to r-help. On Nov 11, 2007 10:32

Re: [R] how to emerge two tables by taking the ave.

2007-11-11 Thread affy snp
Hi Jim, However, the real file has 238000 row ids and 196 column ids. How could I read the file first and then convert it to a matrix? Allen On Nov 11, 2007 11:02 PM, jim holtman [EMAIL PROTECTED] wrote: Here is the way to read the data and convert it. Your data was a dataframe with the

[R] how to randomize a vector

2007-11-11 Thread leffgh
I have a vector whose length is nearly 70 thousand. I need randomize it for 1000 times . for randomizing , I mean ,the elements of the vector remain intact while their order in the vector get changed randomly. I have written a function which seems to be able to solve short vectors , but waste a

Re: [R] Largest N Values Efficiently?

2007-11-11 Thread Prof Brian Ripley
What is 'x' here? What type? Does it contain NAs? Are there ties? R's ordering functions are rather general, and you can gain efficiency by ruling some of these out. See ?sort, look at the 'partial' argument, including the comments in the Details. And also look at ?sort.list. sort.int(x)

Re: [R] Problem with a non-factor, non-numeric variable in a data.frame

2007-11-11 Thread Prof Brian Ripley
I don't know what you mean by 'the latest release', but R does not behave this way in a vanilla session in 2.6.0 or R-patched. Had you given the 'at a minimum' information asked for in the posting guide, we might have been able to deduce what the problem is. I get x1 - c(1:4,4,4,4) f -

Re: [R] Largest N Values Efficiently?

2007-11-11 Thread Frede Aakmann Tøgersen
On my system system.time(x1 - sort(x,decreasing=TRUE)[1:1000]) user system elapsed 0.030.000.03 whereas system.time(x1 - x[order(x)][1:1000]) user system elapsed 0.110.000.11 I.e. using sort is about 30 times faster. Best regards Frede Aakmann Tøgersen

Re: [R] how to randomize a vector

2007-11-11 Thread leffgh
oh, thank you , I used the samplefunction to generate new subordinates but never think that it can directly act on the vector . thank you very much. Frede Aakmann Tøgersen wrote: Why didn't you do this in R? help.search(random sample) Help files with alias or concept or title

[R] help on drawing a tree with ape?

2007-11-11 Thread Hua Li
Dear all, I'm using the ape package in R and want to draw a phylogenetic tree with not only the tip labels but also some labels for the edges. e.g. Mark the edge AB as m in the tree ABC. Couldn't find a way to do that. Can someone help? Thanks, Hua