[R] Extracting the results of a gam smooth

2006-04-15 Thread Thomas L Jones
I am conducting a gam smooth and having a devil of a time getting out the answers so I can work with them. Here are the two lines of code: model - gam(y~lo(x, span=0.75, degree=2), family=poisson) resp_pout - predict (model, data.frame (x=x), type = 'response') The problem comes when I try

Re: [R] suse 10.0

2006-04-15 Thread Detlef Steuer
Hi, you can add a repository for R found on my server: http://fawn.hsu-hh.de ~steuer/SL-10.0-OSS There I provide rpms for R and ESS. You will need e.g. http://mirrors.kernel.org opensuse/distribution/SL-10.0-OSS/inst-source to get a fortran compiler etc. Hope that helps. Detlef On Fri, 14

Re: [R] TukeyHSDs function (pgirmess package)

2006-04-15 Thread Patrick Giraudoux
Sorry to have been so poorly reactive. I have been abroad for ten days and then bogged down with administration for the week when back, so totally unproductive!!! The bug is now fixed in the last release of pgirmess (1.2.6) on its way to CRAN and also available on the pgirmess web site

Re: [R] matching identical row names

2006-04-15 Thread Gabor Grothendieck
aggregate(DF[,-1], DF[, 1, drop = FALSE], mean) On 4/15/06, Srinivas Iyyer [EMAIL PROTECTED] wrote: dear group, i have a sample matrix name v1 v2 v3 v4 cat 1011 12 15 dog 3 12 10 14 cat 9 12 12 15 cat 5 12 10 11 dog 12113 123 31

[R] permutation of rows of a matrix

2006-04-15 Thread javargas
How can I generate a random permutation between rows of a matrix M (of m rows and n columns)? Thanks for your help, Jose __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] permutation of rows of a matrix

2006-04-15 Thread Ramón Casero Cañas
javargas wrote: How can I generate a random permutation between rows of a matrix M (of m rows and n columns)? maybe M[ sample(1:m), ] -- Ramón Casero Cañas http://www.robots.ox.ac.uk/~rcasero/wiki http://www.robots.ox.ac.uk/~rcasero/blog __

Re: [R] matching identical row names

2006-04-15 Thread John Fox
Dear Srinivas, Your data are likely in a data frame rather than a matrix (since the columns are heterogeneous), and name is a variable, not the row names of the data frame. There are several ways to do what you want; one simple way, assuming that the data are in a data frame named Data, is

Re: [R] permutation of rows of a matrix

2006-04-15 Thread John Fox
Dear Jose, M[sample(m, m),] will randomly permute the rows of M. [You probably could have figured this out via help.search(permutation), which would have led you to sample().] Regards, John John Fox Department of Sociology McMaster University Hamilton, Ontario

[R] Removing Rows/Records from a Table

2006-04-15 Thread Peter Lauren
I would like to selectively remove rows from a table. I had hoped that I could create a table and selectively add rows with something like NewTable-table(nrow=100, ncol=4) NewTable[1,]-OldTable[10,] but that doesn't work. The former call gives NewTable ncol nrow 4 100 1 while the

Re: [R] Removing Rows/Records from a Table

2006-04-15 Thread Marc Schwartz
On Sat, 2006-04-15 at 08:19 -0700, Peter Lauren wrote: I would like to selectively remove rows from a table. I had hoped that I could create a table and selectively add rows with something like NewTable-table(nrow=100, ncol=4) NewTable[1,]-OldTable[10,] but that doesn't work. The

Re: [R] vector-factor operation

2006-04-15 Thread Murray Jorgensen
Thanks to Berwin Turlach and Petr Pikal for tapply(vec, Fac, mean)[Fac] and Gabor Grothendieck Thomas Lumley for ave(vec,Fac) . Looking at the code for tapply and ave I guess that the latter is to be preferred. Murray Jorgensen Gabor Grothendieck wrote: Look at ?ave ave(vec, Fac)

[R] manual construction of boxwhisker plot

2006-04-15 Thread Bernd Dittmann
Dear useRs, how can I construct a boxwhisker plot based on the vector fivenum? The challenge I face is as follow: I have a table such as x | fivenum --- ... | (.) ... | (.) and so forth For each observation x I have generated a vector containing the fivenum

Re: [R] permutation of rows of a matrix

2006-04-15 Thread Manuel López-Ibáñez
help(sample) does not say anything about randomly permuting the rows of a matrix M by using M[sample(m,m),]. Perhaps it could be added as an example of use. John Fox wrote: Dear Jose, M[sample(m, m),] will randomly permute the rows of M. [You probably could have figured this out via

[R] clustering genes / automatically determining # of clusters

2006-04-15 Thread andrew mcsweeny
Hi: I'm clustering a microarray dataset with a large # of samples. I would like your opinion on the best way to automatically determine the optimal # of clusters. Currently I am using the cluster package, clustering with clara, examining the average silhouette width at various

Re: [R] permutation of rows of a matrix

2006-04-15 Thread John Fox
Dear Manuel, Although ?sample doesn't specifically describe permuting the rows of a matrix, it does say that sample(x) generates a random permutation of the elements of x (or 1:x). Indexing the rows of the matrix by a permutation of 1:x (where x is the number of rows) doesn't seem to be much of a

[R] generalized hypergeometric function

2006-04-15 Thread Bernardo Rangel tura
Hi R-masters I need compute generalized hypergeometric function. I look in R-project and R-help list and not find nothing about generalized hypergeometric function Is possible calculate the generalized hypergeometric function? Somebody have a script for this? Thanks in advance Bernardo

[R] dcolumn

2006-04-15 Thread Brian Quinif
Does anyone out there use dcolumn=TRUE in the latex() function in the Hmisc library? I would like to line up the data in a latex table I'm making using latex(), but I'm having some issues with this feature. Since there is no description of it in the help, I thought that it might be incomplete or

Re: [R] generalized hypergeometric function

2006-04-15 Thread Marc Schwartz
On Sat, 2006-04-15 at 20:59 -0300, Bernardo Rangel tura wrote: Hi R-masters I need compute generalized hypergeometric function. I look in R-project and R-help list and not find nothing about generalized hypergeometric function Is possible calculate the generalized hypergeometric

[R] second try; writing user-defined GLM link function

2006-04-15 Thread Jessi Brown
I apologize for my earlier posting that, unbeknownst to me before, apparently was not in the correct format for this list. Hopefully this attempt will go through, and no-one will hold the newbie mistake against me. I could really use some help in writing a new glm link function in order to run

Re: [R] manual construction of boxwhisker plot

2006-04-15 Thread Marc Schwartz
On Sat, 2006-04-15 at 19:26 +0200, Bernd Dittmann wrote: Dear useRs, how can I construct a boxwhisker plot based on the vector fivenum? The challenge I face is as follow: I have a table such as x | fivenum --- ... | (.) ... | (.) and so forth

[R] string vector indices

2006-04-15 Thread Luke
Hi, I have a string vector, say, x - a, aab and anther string vector, say, y - a, aa, aab, aabc. Is there any R function to get the indices of y for the elements of x, that is, foo(x, y) will give me the index vector c(1, 3)? I know i can combine apply() and grep(^aab$, y) to do it. But is

[R] Lin's coefficient of concordance

2006-04-15 Thread Alexandre Santos Aguiar
Em Qui 13 Abr 2006 08:58, Ronán Conroy escreveu: See also Lin's coefficient of concordance, which is implimented in Nick Cox's Stata routine -concord-, along with the Bland-Altman Limits of Agreement method. Note, too, that both Stata and R calculated the CI incorrectly due to an ambiguous

[R] solve matrix

2006-04-15 Thread Nongluck Klibbua
Hi R-users, I try to use solve to find the answer of this linear equation a=x*b where a is 2*1 matrix and b is 2*2 matrix.I would like to get x so I call y-solve(a,b) but this one happen a is 2*1 matrix so what I should do . Thanks Luck __