Re: [R] R det

2007-11-16 Thread Prof Brian Ripley
On Fri, 16 Nov 2007, kalin lagno wrote: > I used det but it gives me infinity. I think my matrix values are too > big or small (I a range around (+,-)8*e^28 ) R has numerical values up to about 1e308 (10^308), but you have not told us your matrix size. It sounds as if you would benefit from r

Re: [R] R det

2007-11-16 Thread kalin lagno
I used det but it gives me infinity. I think my matrix values are too big or small (I a range around (+,-)8*e^28 ) I need a numerical value for determinant, can somebody tell me what should I do? Kalin Paul Smith <[EMAIL PROTECTED]> wrote: On Nov 16, 2007 7:27 PM, kalin lagno wrote: > Whic

Re: [R] analysis of large data set

2007-11-16 Thread Prof Brian Ripley
On Fri, 16 Nov 2007, sj wrote: > All, > > I am working with a large data set (~ 450,000 rows by 34 columns) I am > trying to fit a regression model (I have tried to use several procedures psm > (Design package) lm, glm). However whenever I try to fit the model I get the > following error: > > > Er

Re: [R] OT: good code snippet manager

2007-11-16 Thread Denver XU
Tinn-R 2007/11/17, Wensui Liu <[EMAIL PROTECTED]>: > Might anyone recommend a good code snippet manager to me? > I really appreciate it! > > -- > === > WenSui Liu > (http://spaces.msn.com/statcompute/blog) > > __ > R-help@r-

[R] odf and unzip: unzip not found

2007-11-16 Thread Steve Powell
hi list members I am trying to use odfWeave with R 2.5.1 on Windows XP. however when running e.g. odfWeave(demoFile, outputFile) I get: Error in odfWeave(demoFile, outputFile) : Error unzipping file In addition: Warning message: unzip not found in: system(zipCmd[2], invisible = TRUE) presum

[R] OT: good code snippet manager

2007-11-16 Thread Wensui Liu
Might anyone recommend a good code snippet manager to me? I really appreciate it! -- === WenSui Liu (http://spaces.msn.com/statcompute/blog) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

Re: [R] How to save multiple graphs into a single file

2007-11-16 Thread jim holtman
Have you tried: pdf("test.pdf") boxplot(data1~groups,...) boxplot(data2~groups,...) boxplot(data3~groups,...) dev.off() On Nov 16, 2007 4:43 PM, Mike Jones <[EMAIL PROTECTED]> wrote: > Hi, > > I have searched the archives and help manuals and can not find anything > regarding how to save multipl

Re: [R] options$max.print

2007-11-16 Thread jim holtman
try: options(scipen=8) On Nov 16, 2007 3:07 PM, qian z <[EMAIL PROTECTED]> wrote: > I am working on a dataset. Some data appear in scientific notation format, > such as 5.8237365731e-05. > > Right now I want them appear as decimal format. > > I try to use options(max.print="10"),

Re: [R] Rgraphviz

2007-11-16 Thread Loren Engrav
Finale to this thread... Several old discussions mentioned Xcode as the culprit But I installed that months ago and have used it ever since so I ignored the message But then I thought why not reinstall And reinstall of Xcode seems to have fixed the problem So install graphviz 2.12 and reinstall X

Re: [R] save p-value in mshapiro.test(mvnormtest)

2007-11-16 Thread Charilaos Skiadas
On Nov 16, 2007, at 8:04 PM, Jiao Yang wrote: > Dear all, > > I want to save the p-value from mshapiro.test(mvnormtest). But > mshapiro.test(mvnormtest) gives a list with class "htest" > containing statistic, p.value, method and data.name as a whole. Elements of a list are accessed, among ot

Re: [R] Permutation of a distance matrix

2007-11-16 Thread Charilaos Skiadas
On Nov 16, 2007, at 6:42 PM, Andrew Park wrote: > Hi there, > > I would like to find a more efficient way of permuting the rows and > columns of a symmetrical matrix that represents ecological or > actual distances between objects in space. The permutation is of > the type used in a Mantel

[R] save p-value in mshapiro.test(mvnormtest)

2007-11-16 Thread Jiao Yang
Dear all, I want to save the p-value from mshapiro.test(mvnormtest). But mshapiro.test(mvnormtest) gives a list with class "htest" containing statistic, p.value, method and data.name as a whole. How do I save only p-value from the result? Thanks a lot! __

Re: [R] analysis of large data set

2007-11-16 Thread Matthew Keller
Spencer, There have been a lot of discussions on these boards re working with large datasets in R, so looking through those will probably inform you better than I'll be able to. So with that said... I have been trying to work with very large datasets as well (genetic datasets... maybe we're in th

Re: [R] Rgraphviz

2007-11-16 Thread Loren Engrav
Was pointed out this is the wrong list But then cross posting is also bad So will leave here for now, sorry, have now signed up for the Mac list Also pointed out too little detail so will try for more, sorry MacOS 10.4.10 All installed from the latest binaries 2.6.0 All running with R.app so inst

Re: [R] ks.test

2007-11-16 Thread Ben Bolker
elyakhlifi mustapha wrote: > > Hello, > I want to do normality test on my data > I write this but I don't understand the display of the results > > ks.test(data,"pnorm") > > In fact I want to know if my data is a normal distribution. I have to > check the p-value or D? > Thanks. > > Examp

[R] monthplot () - axis change color

2007-11-16 Thread Nuno Prista
Hi, When I run this code a part of my x-axis and y-axis changes color. Can somebody tell me what is wrong? Also, is there a way to control the color of the average lines? monthplot(AirPassengers+500, ylim=c(min(AirPassengers), max(AirPassengers+500)), ylab="") par(new=T) monthplot(AirPass

Re: [R] Arranging multiple lattice plots in one page

2007-11-16 Thread Markus Gesmann
Hi Judith, See the example in the xyplot help page, using the print function: plot <- xyplot(sunspot.year ~ 1700:1988, xlab = "", type = "l", scales = list(x = list(alternating = 2)), main = "Yearly Sunspots") print(plot, position = c(0, .3, 1, .9),

Re: [R] alternative to logistic regression

2007-11-16 Thread markleeds
>From: Prof Brian Ripley <[EMAIL PROTECTED]> >Date: 2007/11/16 Fri AM 09:28:27 CST >To: Terry Therneau <[EMAIL PROTECTED]> >Cc: [EMAIL PROTECTED], r-help@r-project.org >Subject: Re: [R] alternative to logistic regression Thanks to both of you, Terry and Brian for your comments. I'm not sure what I

Re: [R] graphics - line resolution/pixelation going from R to windows metafile

2007-11-16 Thread Mose Andre
You might try using the Cairo package, which will allow you to bypass using the Windows graphics device and can give you anti-aliasing. As the manual says: "It is ideal for use in server environments (file output) and as a replacement for other devices that don't have Cairo's capabilities such as

[R] Permutation of a distance matrix

2007-11-16 Thread Andrew Park
Hi there, I would like to find a more efficient way of permuting the rows and columns of a symmetrical matrix that represents ecological or actual distances between objects in space. The permutation is of the type used in a Mantel test. Specifically, the permutation has to accomplish somethi

[R] Nonparametric manova

2007-11-16 Thread Daniel Malter
Hi, I have seen a discussion in the R-help asking whether nonparametric manova has been implemented in R yet. This discussion is form March 2006 and there seemed to be no package or function implemented at the time. Has this changed? Is there a package that provides nonparametric manova as in McArd

Re: [R] R det

2007-11-16 Thread Paul Smith
On Nov 16, 2007 7:27 PM, kalin lagno <[EMAIL PROTECTED]> wrote: > Which R function I should use to obtain determinant of a matrix with real(and > complex) numbers? For real matrices: ?det Paul __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] diagonal LDA

2007-11-16 Thread Weiwei Shi
you can modify the code a bit to generate posterior prob. it is not very difficult to do that. i can send mine but absolutely NO guarantee. On Nov 16, 2007 1:50 AM, array chip <[EMAIL PROTECTED]> wrote: > Thanks for suggestion. the dlda() function in supclust > only outputs the class prediction w

Re: [R] alternative to logistic regression

2007-11-16 Thread Prof Brian Ripley
On Fri, 16 Nov 2007, Terry Therneau wrote: > You can fit a linear probability model with glm and a bit of arm twisting. > First, make your own copy of the binomial function: > > dump('binomial', file='mybinom.R') > > Edit it to change the function name to "mybinom" (or anything else you > like),

[R] constraint matrices in vglm (VGAM package)

2007-11-16 Thread Tung.Lin
Hello R users, I am performing a multinomial logit regression and would like to constrain a few model coefficients to be equal. Here is my model: multi <- vglm(case123con ~ SNP_A1+SNP_A2+age, multinomial, work.analy) where case123con is a four level categorical variable (case 1, case 2,

[R] [R-pkgs] New version of actuar

2007-11-16 Thread Vincent Goulet
UseRs, Version 0.9-4 of actuar should be making its way to CRAN mirrors. The main highlights of this new version are speed enhancements for a few functions, support for phase-type distributions and functions for ruin theory. The relevant section of the NEWS file follows Version 0.9-4 =

Re: [R] homogenity inside groups

2007-11-16 Thread Petr PIKAL
Thank you. I will try. Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 16.11.2007 13:21:13: > On Fri, 2007-11-16 at 11:49 +0100, Petr PIKAL wrote: > > Yes, that is what I meant. It is not a species but some products and I > > have various parameters measured for each product. But basically

Re: [R] Exponential Smoothing for ggplot2's stat_smooth()

2007-11-16 Thread hadley wickham
Hi Michael, To use stat_smooth as is, you need a smoothing function that basically works like lm. So you have two options: to make an interface to HoltWinters (or find another exponential smooth that already has that interface) or write your own stat object, which might look something like this:

[R] analysis of large data set

2007-11-16 Thread sj
All, I am working with a large data set (~ 450,000 rows by 34 columns) I am trying to fit a regression model (I have tried to use several procedures psm (Design package) lm, glm). However whenever I try to fit the model I get the following error: Error: cannot allocate vector of size 1.1 Gb Her

[R] Efficient way to compute power of a sparse matrix

2007-11-16 Thread Stéphane Dray
Dear all, I would like to compute power of a square non symmetric matrix. This is a part of a simulation study. Matrices are quite large (e.g., 900 by 900), and contains many 0 (more than 99 %). I have try the function mtx.exp of the Biodem package: library(Biodem) m <- matrix(0, 900, 900) i <-

Re: [R] alternative to logistic regression

2007-11-16 Thread Prof Brian Ripley
On Fri, 16 Nov 2007, Terry Therneau wrote: > Brian Ripley wrote > "Hmm ... I think you are generalizing from another R-like system." > > Actually no, I was reading R source code that has no comments, and assumed > incorrectly that 1. the variable "okLinks" was the list of allowed links and > that

[R] generate multivariate F with specified correlation matrix

2007-11-16 Thread Jiao Yang
Dear all, In MATLAB, to generate multivariate F with specified correlation matrix Pn I can use the code such as Z = mvnrnd([0 0 0 0 0], Pn, N); U = normcdf(Z,0,1); X = [finv(U(:,1),5,15) finv(U(:,2),5,15) finv(U(:,3),5,15) finv(U(:,4),5,15) finv(U(:,5),5,15)]; Is there something similar in R?

[R] How to save multiple graphs into a single file

2007-11-16 Thread Mike Jones
Hi, I have searched the archives and help manuals and can not find anything regarding how to save multiple plots/graphs into a single for example, pdf file. There is plenty of discussion etc. about saving a single plot to a single file, but not multiple plots to a single file. Is it possible? I ca

[R] Exponential Smoothing for ggplot2's stat_smooth()

2007-11-16 Thread Michael King
Hello everyone, I was wondering if anyone was aware of a way in which I could use ggplot's stat_smooth() function for add an exponential moving average. I was thinking that I could maybe use something like: >myggplot + stat_smooth (method = 'HoltWinters( data , .9 , 0, 0)') but my efforts were

[R] options$max.print

2007-11-16 Thread qian z
I am working on a dataset. Some data appear in scientific notation format, such as 5.8237365731e-05. Right now I want them appear as decimal format. I try to use options(max.print=”10”), but it doesn’t work. How do I fix it? Thanks. --

Re: [R] generate combination set

2007-11-16 Thread Peter Dalgaard
Adrian Dusa wrote: > On Thursday 15 November 2007, [EMAIL PROTECTED] wrote: > >> Actually, (now that I know about combn), a better way is >> >> t(matrix(set[combn(7,2)], nrow = 2)) >> > > Indeed, or to avoid transposing: > > matrix(set[combn(7,2)], ncol = 2, byrow=T) > > Adrian > > Or ev

[R] R det

2007-11-16 Thread kalin lagno
Hi, Which R function I should use to obtain determinant of a matrix with real(and complex) numbers? Kalin - Never miss a thing. Make Yahoo your homepage. [[alternative HTML version deleted]] __ R-help@r

Re: [R] Extracting x-values from an ecdf

2007-11-16 Thread Dieter Menne
Benjamin Zuckerberg syr.edu> writes: > After having produced a cumulative distribution using ecdf, I would > like to extract the exact x-value for a given percentile. For example > I can ascertain the 1st and 3rd quartile using the summary function: > > cawa.cdp <- ecdf(cawaocc$LEFF80) > pl

Re: [R] homogenity inside groups

2007-11-16 Thread Gavin Simpson
On Fri, 2007-11-16 at 11:49 +0100, Petr PIKAL wrote: > Yes, that is what I meant. It is not a species but some products and I > have various parameters measured for each product. But basically I thought > that ecological data are quite similar. > > So I would be glad to be able to try your code.

Re: [R] Equal confidence interval arrowhead lengths across multiple-paneled lattice plots with free y-scales

2007-11-16 Thread Deepayan Sarkar
On Nov 16, 2007 5:26 AM, Bob Farmer <[EMAIL PROTECTED]> wrote: > Yep, that did it, thanks. Great. [...] > > The obvious approach would be to use a relative unit like "cm" or > > "inch" instead of an absolute one like "native". Does that not work? Of course, that should have had 'absolute' inste

Re: [R] Arranging multiple lattice plots in one page

2007-11-16 Thread Gabor Grothendieck
par is for classic graphics -- not grid-based graphics like lattice. See: http://tolstoy.newcastle.edu.au/R/help/05/06/5629.html On Nov 16, 2007 10:46 AM, Judith Flores <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to arrange 3 different lattice plots in > one page. I tried defining par and l

Re: [R] help on drawing a tree with "ape"?

2007-11-16 Thread Ben Bolker
Hua Li wrote: > > Thanks again, Ben. > > Specifically my question should be; > > If I know that I'll be using variables to represent > the distances between species: > > a = AB > b = AC > d = CD > > and I also know my tree can be written as > "((A:51.78,(C:24.6,D:24.6):27.18):40.06,B:91.84)

Re: [R] Help with R software

2007-11-16 Thread Charles C. Berry
On Fri, 16 Nov 2007, aparna m wrote: > Hi > Can anyone teall me how to perform matrix related operations > using R like multiplication of a n*n matrix , finding transpose , > inverse eigen values etc Yes. Its all in the manuals. Especially, An Introduction to R Section 5.7 M

[R] graphics - line resolution/pixelation going from R to windows metafile

2007-11-16 Thread Brian S Cade
I have a recurring graphics issue that I've not been able to resolve with R. If I make a series of regression estimates and then plot the estimated function for the regression lines over a scatter plot of the data, e.g., using a sequence of plot( ) and lines ( ) similar to those below plot(dep

Re: [R] ggplot2 frequency Y axis label

2007-11-16 Thread hadley wickham
Hi Felipe, That's should be the default. How is it different to what you expect? Hadley On 11/16/07, Felipe Carrillo <[EMAIL PROTECTED]> wrote: > Hi all: > I wonder if ggplot2 can create histograms with > frequency along the Y axis > > Felipe D. Carrillo > Fishery Biologist > US Fish & Wil

[R] Help with R software

2007-11-16 Thread aparna m
Hi Can anyone teall me how to perform matrix related operations using R like multiplication of a n*n matrix , finding transpose , inverse eigen values etc Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] alternative to logistic regression

2007-11-16 Thread Terry Therneau
Brian Ripley wrote "Hmm ... I think you are generalizing from another R-like system." Actually no, I was reading R source code that has no comments, and assumed incorrectly that 1. the variable "okLinks" was the list of allowed links and that 2. the error message further in the code

Re: [R] alternative to logistic regression

2007-11-16 Thread Terry Therneau
You can fit a linear probability model with glm and a bit of arm twisting. First, make your own copy of the binomial function: > dump('binomial', file='mybinom.R') Edit it to change the function name to "mybinom" (or anything else you like), and to add 'identity' to the list of okLinks. So

Re: [R] Scaling a column in groups

2007-11-16 Thread Gabor Grothendieck
Try this: c(apply(matrix(testdata, 25), 2, scale)) On Nov 16, 2007 9:20 AM, john seers (IFR) <[EMAIL PROTECTED]> wrote: > > Hello R people > > I have a column of numeric values that are grouped in blocks of 25 and > to be centered and scaled within each block. (That is subtract the mean > and div

Re: [R] Help with R software

2007-11-16 Thread John Sorkin
Aparna You can find information about matrix inversion in the MASS package [function: ginv()]. Matrix multiplication is performed using the %*% operator. Transpose is performed by the t() function. I suggest you do some searching. Open R, go to HELP>HTML HELP then click on SEARCH ENGINE & KEYWOR

[R] Help on ANCOVA

2007-11-16 Thread Geertje Van der Heijden
Hi, I am trying to fit a ANCOVA model using lmRob. The P-values of the variables in the model differ hugely between the summary() function and the anova() function (from >0.8 in the summary to <0.001in the anova for the same variable). I understand that with an ANCOVA the order in which the variab

[R] Scaling a column in groups

2007-11-16 Thread john seers (IFR)
Hello R people I have a column of numeric values that are grouped in blocks of 25 and to be centered and scaled within each block. (That is subtract the mean and divide by the standard deviation.) Is there a neater way to do this? i.e not using a loop? Example looped code: testdata<-1:100 cs

[R] Extracting x-values from an ecdf

2007-11-16 Thread Benjamin Zuckerberg
Dear R users, Quick question on the use of ecdf for producing a cumulative distribution function. After having produced a cumulative distribution using ecdf, I would like to extract the exact x-value for a given percentile. For example I can ascertain the 1st and 3rd quartile using the su

Re: [R] About print a label in plot

2007-11-16 Thread affy snp
Thanks Julian! I will look into this in a moment. Best, Allen On 11/16/07, Julian Burgos <[EMAIL PROTECTED]> wrote: > > Hey Allen, > > Again, if you don't tell us what kind of object 'Disease.FL' is, it will > be difficult for us to help you. As I told you, plot() is a generic > function a

Re: [R] About print a label in plot

2007-11-16 Thread Julian Burgos
Hey Allen, Again, if you don't tell us what kind of object 'Disease.FL' is, it will be difficult for us to help you. As I told you, plot() is a generic function and its behaviour will depend on the type of object you pass to it. For example, if 'Disease.FL' is an object of class lm (i.e. the

Re: [R] About print a label in plot

2007-11-16 Thread Julian Burgos
affy snp wrote: > Dear list, > > Hello! I have a question about how to print a label in the plot. > I am using the following code: > > width=5);plot(Disease.FL, index=i, type="Single",main="Plot of > Labels");dev.off(); > > But "Plot of Labels" has not been printed. Any suggestions? > > Thanks a

Re: [R] alternative to logistic regression

2007-11-16 Thread markleeds
>From: Prof Brian Ripley <[EMAIL PROTECTED]> >Date: 2007/11/16 Fri AM 09:44:59 CST >To: [EMAIL PROTECTED] >Cc: Terry Therneau <[EMAIL PROTECTED]>, r-help@r-project.org >Subject: Re: Re: [R] alternative to logistic regression Thanks Brian: I'll look at the MASS book example for sure but I don't thi

Re: [R] alternative to logistic regression

2007-11-16 Thread roger koenker
Perhaps I could just add that my experience with step halving in glm -- fitting models with somewhat non-standard links for binary response [as reported in Rnews: http://cran.r-project.org/doc/Rnews/ Rnews_2006-4.pdf] was excellent. Once some scaling issues for the links were resolved, we had

[R] accessing nodes in a dendrogram

2007-11-16 Thread Jesse D Lecy
Hi All, I am new to R, so please excuse the simplicity of the question. I am trying to remove nodes from a dendrogram - specifically nodes that have less than 3 members. I am trying to create a function to do so, but I am not sure how to reference the node inside of the function. Here is the

Re: [R] help on drawing a tree with "ape"?

2007-11-16 Thread Hua Li
Thanks again, Ben. Specifically my question should be; If I know that I'll be using variables to represent the distances between species: a = AB b = AC d = CD and I also know my tree can be written as "((A:51.78,(C:24.6,D:24.6):27.18):40.06,B:91.84):0.0;" is there a way to allow me mark the ed

Re: [R] Using plotmath expressions in lattice key text

2007-11-16 Thread Bert Gunter
Thanks Deepayan. I knew it was simple ... (but I doubt I would ever have figured it out). Bert Gunter Genentech Nonclinical Statistics -Original Message- From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 8:02 PM To: Bert Gunter Cc: R Help Subject: Re: [

Re: [R] Debugging a hanging function within R

2007-11-16 Thread Duncan Murdoch
On 11/16/2007 9:48 AM, Yan Wong wrote: > On 16 Nov 2007, at 14:16, Duncan Murdoch wrote: > >> On 11/16/2007 6:58 AM, Yan Wong wrote: >>> Hi, >>> I can't seem to find a way to do this (i.e. interrupt a routine at >>> an arbitrary time during its run, then step into it using the >>> debugger).

[R] generate multivariate F with specified correlation matrix

2007-11-16 Thread Jiao Yang
Dear all, In MATLAB, to generate multivariate F with specified correlation matrix Pn I can use the code such as Z = mvnrnd([0 0 0 0 0], Pn, N); U = normcdf(Z,0,1); X = [finv(U(:,1),5,15) finv(U(:,2),5,15) finv(U(:,3),5,15) finv(U(:,4),5,15) finv(U(:,5),5,15)]; Is there something similar in R?

[R] How do I import packages with the package I've built?

2007-11-16 Thread Nutter, Benjamin
I have successfully completed building a package to contain the functions I commonly use. However, I need to have other packages installed in order for some of my functions to work. I've been studying the instructions on installing packages for about a month now, but still haven't figured this on

[R] Question about lmRob

2007-11-16 Thread Geertje Van der Heijden
Hi, I am trying to fit a ANCOVA model using lmRob. The P-values of the variables in the model differ hugely between the summary() function and the anova() function (from >0.8 in the summary to <0.001in the anova for the same variable). I understand that with an ANCOVA the order in which the variab

Re: [R] Debugging a hanging function within R

2007-11-16 Thread Yan Wong
On 16 Nov 2007, at 15:05, Gabor Grothendieck wrote: > Try this: > > f <- function() { >for(i in 1:1000) { > if (i == 50) browser() > print(i) > } > } > > # enters debugger when i is 50. > # n/c/Q will step one statement/continue/Quit respectively > f() Thanks. The problem is that

[R] Arranging multiple lattice plots in one page

2007-11-16 Thread Judith Flores
Hi, I am trying to arrange 3 different lattice plots in one page. I tried defining par and layout without success. What I wrote looks something like this: par(mfrow=c(3,1)) barplot(...) xyplot(...) barplot(...) ___

Re: [R] alternative to logistic regression

2007-11-16 Thread Prof Brian Ripley
On Fri, 16 Nov 2007, [EMAIL PROTECTED] wrote: >> From: Prof Brian Ripley <[EMAIL PROTECTED]> >> Date: 2007/11/16 Fri AM 09:28:27 CST >> To: Terry Therneau <[EMAIL PROTECTED]> >> Cc: [EMAIL PROTECTED], r-help@r-project.org >> Subject: Re: [R] alternative to logistic regression > > Thanks to both of

[R] ggplot2 frequency Y axis label

2007-11-16 Thread Felipe Carrillo
Hi all: I wonder if ggplot2 can create histograms with frequency along the Y axis Felipe D. Carrillo Fishery Biologist US Fish & Wildlife Service Red Bluff, California 96080 Be a better pen pal.

[R] Graphical Manova: Fails When There Are Three Factors

2007-11-16 Thread Bryan Hanson
Hi R Gurus & Lurkers... Thanks in advance to anyone who is willing to tackle this! Bryan I have been implementing the graphical manova method described in "An Introduction to Ggobi" (from the Ggobi web site). A stand alone working code is appended below. The code is almost the same as describ

Re: [R] Scaling a column in groups

2007-11-16 Thread john seers (IFR)
Ah, that is neat. Thanks. JS -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: 16 November 2007 15:12 To: john seers (IFR) Cc: r-help@r-project.org Subject: Re: [R] Scaling a column in groups Try this: c(apply(matrix(testdata, 25), 2, scale)) On Nov 16,

[R] Fixed heritability in an lme model

2007-11-16 Thread joseph powell (RI)
Hi R help, I wanted to set a fixed heritability for the object "Trait" left of ~ operator. Is this possible using lme, or would I need to use something like gls? This is the model line contained within a function; lme.out <- summary(lme(Trait ~ genotype, random = ~1|sire, weights=~number, na.act

Re: [R] Debugging a hanging function within R

2007-11-16 Thread Gabor Grothendieck
Try this: f <- function() { for(i in 1:1000) { if (i == 50) browser() print(i) } } # enters debugger when i is 50. # n/c/Q will step one statement/continue/Quit respectively f() On Nov 16, 2007 6:58 AM, Yan Wong <[EMAIL PROTECTED]> wrote: > Hi, > > I have an R program which takes

Re: [R] Debugging a hanging function within R

2007-11-16 Thread Yan Wong
On 16 Nov 2007, at 14:16, Duncan Murdoch wrote: > On 11/16/2007 6:58 AM, Yan Wong wrote: >> Hi, >> I can't seem to find a way to do this (i.e. interrupt a routine at >> an arbitrary time during its run, then step into it using the >> debugger). > > If you prepare in advance by using options(

Re: [R] homogenity inside groups

2007-11-16 Thread Petr PIKAL
Yes, that is what I meant. It is not a species but some products and I have various parameters measured for each product. But basically I thought that ecological data are quite similar. So I would be glad to be able to try your code. Thank you Petr Pikal [EMAIL PROTECTED] Gavin Simpson <[EMAI

Re: [R] expand.grid overflows?

2007-11-16 Thread Dimitris Rizopoulos
you could try the following: # here with 10 instead of 50 ind <- t(combn(10, 5)) nind <- nrow(ind) cbn <- rep(0, 10 * nind) dim(cbn) <- c(nind, 10) for (i in 1:nind) { cbn[cbind(i, ind[i, ])] <- 1 } cbn rowSums(cbn) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Bio

Re: [R] Debugging a hanging function within R

2007-11-16 Thread Duncan Murdoch
On 11/16/2007 6:58 AM, Yan Wong wrote: > Hi, > > I have an R program which takes several days to run, and sometimes > hangs while running, presumably stuck in some sort of loop within a > package function. I don't know where in the program code it is > hanging: it is likely to be within a ro

Re: [R] generate combination set

2007-11-16 Thread Adrian Dusa
Hi Haris, On Thursday 15 November 2007, Charilaos Skiadas wrote: > I must be missing something. What's wrong with: > > combn(set, 2) > > or if we must t(combn(set,2)), optionally with a function argument in > the combn call if something is to be done with the pairs? > > So if you really wanted the

[R] Debugging a hanging function within R

2007-11-16 Thread Yan Wong
Hi, I have an R program which takes several days to run, and sometimes hangs while running, presumably stuck in some sort of loop within a package function. I don't know where in the program code it is hanging: it is likely to be within a routine that is iterated many hundreds of thousands

Re: [R] generate combination set

2007-11-16 Thread Adrian Dusa
On Friday 16 November 2007, Peter Dalgaard wrote: > [...] > > Or even (from someone who have known about combn for a while) > > > combn(LETTERS[1:7], 2, paste, collapse="") > > [1] "AB" "AC" "AD" "AE" "AF" "AG" "BC" "BD" "BE" "BF" "BG" "CD" "CE" > "CF" "CG" > [16] "DE" "DF" "DG" "EF" "EG" "FG" Ch

Re: [R] monthplot () - axis change color

2007-11-16 Thread Gabor Grothendieck
Try this: monthplot(AirPassengers+500, ylim=c(min(AirPassengers), max(AirPassengers+500)), ylab="") par(new=T) monthplot(AirPassengers, col="blue", ylim=c(min(AirPassengers), max(AirPassengers+500)), axes = FALSE) On Nov 16, 2007 8:30 AM, Nuno Prista <[EMAIL PROTECTED]> wrote: > Hi, > > > > W

Re: [R] sorting factor levels by data frequency of levels

2007-11-16 Thread Dimitris Rizopoulos
one way is the following: tb <- table(state) statefac <- factor(state, levels = names(tb[order(tb, decreasing = TRUE)])) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvo

Re: [R] Equal confidence interval arrowhead lengths across multiple-paneled lattice plots with free y-scales

2007-11-16 Thread Bob Farmer
Yep, that did it, thanks. --Bob Deepayan Sarkar wrote: > On Nov 15, 2007 8:08 PM, Bob Farmer <[EMAIL PROTECTED]> wrote: >> Hi. >> I've got a lattice plot with multiple panels and two groups superimposed >> on each panel. Each panel has an independently scaled y-axis (scales = >> list(relation =

Re: [R] Projection of Shapefiles using Maptools

2007-11-16 Thread Roger Bivand
Jens Oldeland gmx.de> writes: > > Dear R-Users > > I have successfully imported my Shapefile using maptools with the > following command lines, and I hoped that my object (nc) will be > recognized as projected data, so I have included the CRS command: > > library(maptools) > p4s = CRS("+proj

[R] sorting factor levels by data frequency of levels

2007-11-16 Thread Shoaaib Mehmood
using an example from r online help > state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa", "qld", "vic", "nsw", "vic", "qld", "qld", "sa", "tas", "sa", "nt", "wa", "vic", "qld", "nsw", "nsw", "wa", "sa", "act", "nsw", "vic", "vic", "act") >statefac<-factor(state) now if i us

[R] expand.grid overflows?

2007-11-16 Thread francogrex
>cbn<-as.matrix(expand.grid( rep( list(0:1), 50))) Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) : invalid 'times' value In addition: Warning message: In rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) : NAs introduced by coercion But I'm only interested in c

[R] logrank test

2007-11-16 Thread raymond chiruka
hie carried out a comparison of survival curves using the log rank test in R with the values of rho ranging from -2 to 2 in increments of 0.5 the question is at rho=-1.5 the power of the test seems to fluctuate or differ from the trend shown by the other values of rho is the statistical reason

Re: [R] counting strings of identical values in a matrix

2007-11-16 Thread A M Lavezzi
Marc and Gabor thank you so much. Also for making me realize how litte I know about R's potential best, Mario ps I actually thought about appending that row of zeros while waking up this morning.. At 18.35 15/11/2007, Gabor Grothendieck wrote: >We can append a row of 0's to handle that case:

[R] ks.test

2007-11-16 Thread elyakhlifi mustapha
Hello, I want to do normality test on my data I write this but I don't understand the display of the results ks.test(data,"pnorm") In fact I want to know if my data is a normal distribution. I have to check the p-value or D? Thanks. _

[R] Odp: R: ave and quantile

2007-11-16 Thread Petr PIKAL
Hi Patrick Hausmann <[EMAIL PROTECTED]> napsal dne 15.11.2007 18:59:06: > Hello Petr, > > one question solved, the next is standing in front of me... If you > have a minute to look great! > > > x >V1 V2F1 > 1 A 2 0.1552277 > 2 A 3 0.1552277 > 3 A 4 0.1552277 > 4 B 3 0

Re: [R] diagonal LDA

2007-11-16 Thread array chip
Thanks for suggestion. the dlda() function in supclust only outputs the class prediction without details of the model and the posterior probabilities like the lda() function in MASS. Is there an equivalent to the lda() for diagonal linear discriminant analysis? Thanks --- Weiwei Shi <[EMAIL PROT

Re: [R] R 2.6.0 & RMySQL

2007-11-16 Thread Prof Brian Ripley
On Fri, 16 Nov 2007, Joachim Claudet wrote: Dear all -- I was facing some problems with the last versions of R and RMySQL. Someone saw my post on another forum and answered me. And now... it works! Here is the message: " I was having the same problem (well, except for the French part) and I so

Re: [R] creating discretized data

2007-11-16 Thread Ingmar Visser
sapply(x,FUN=function(y) {c(rep(0,y-1),1)}) On 16 Nov 2007, at 10:36, G Ilhamto wrote: > Hi, Ia m working in discretized data. Here my data: > > x <- c(2,1,3, 5), and I want to make (0,1) data based on the > length of > each component in x. > So the new data should like: y = (0, 1, 1, 0, 0,

[R] creating discretized data

2007-11-16 Thread G Ilhamto
Hi, Ia m working in discretized data. Here my data: x <- c(2,1,3, 5), and I want to make (0,1) data based on the length of each component in x. So the new data should like: y = (0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1). I spent too much time with "seq", "rep". Still didn't get it. Any help? Thanks Ilha

Re: [R] creating discretized data

2007-11-16 Thread Robin Hankin
Hi The "trick" is to define a function f() that does what you want elementwise, then use lapply(): > f <- function(i){c(rep(0,i-1),1)} > x <- c(2,1,3,5) > c(lapply(x,f),recursive=T) [1] 0 1 1 0 0 1 0 0 0 0 1 > HTH rksh > Hi, Ia m working in discretized data. Here my data: > > x <- c(2,1

Re: [R] R 2.6.0 & RMySQL

2007-11-16 Thread Joachim Claudet
Dear all -- I was facing some problems with the last versions of R and RMySQL. Someone saw my post on another forum and answered me. And now... it works! Here is the message: " I was having the same problem (well, except for the French part) and I solved it like this: Download the windows MySQL 5

[R] Rgraphviz

2007-11-16 Thread Loren Engrav
Rgraphviz I cannot load it I have re-installed etc etc etc etc And cannot load it Message is 6): Library not loaded: /usr/local/lib/libgvc.3.dylib Referenced from: /Library/Frameworks/R.framework/Versions/2.6/Resources/library/Rgraphviz/lib s/ppc/Rgraphviz.so Reason: image not found Error :

Re: [R] not R question : alternative to logistic regression

2007-11-16 Thread S Ellison
Probabilities can only be even approximately linearly related to a continuous predictor variable for a limited range, otherwise the model will predict probabilities below 0 or above 1. At some point, they have to tail off... unless you are modelling something trivial like 'probability of being abo