[R] IMSL Wrapper

2006-06-21 Thread ManojW
Dear R-help, Is there any wrapper avaliable to use IMSL C library functions within R? Thanks. Manoj __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] A question related with resale()

2006-06-21 Thread zhijie zhang
Dearfriends, A question related with resale(). I have a dataset *a* with three variables *x,y,id* I want to do two different things: 1. rescale the combination of x and y into the new range --unit square(0,1),that is, keep the shape of original plot; 2.rescale x and y into the new range (0,1)

Re: [R] hello Excel... (native/Package/BETA)

2006-06-21 Thread Rainer M Krug
Hans-Peter wrote: Dear list members I am pleased to annonce that I have just finished a native Excel reader/writer. It's wrapped up in two packages: either xlsReadWrite (open source) or the slightly beefed-up xlsReadWritePro (shareware). Working with Excel data is now as easy as writing

Re: [R] multi-dimension array of raw

2006-06-21 Thread Prof Brian Ripley
On Tue, 20 Jun 2006, Duncan Murdoch wrote: On 6/20/2006 6:24 PM, Gerald Jansen wrote: I would like to store and manipulate large sets of marker genotypes compactly using raw data arrays. This works fine for vectors or matrices, but I run into the error shown in the example below as soon as I

Re: [R] GARCH

2006-06-21 Thread Prof Brian Ripley
Why do you think help.search(garch-methods, package=tseries) finds accessor functions? That is notation for S4 methods, and garch is an S3 class so there will be none. Here there _is_ an accessor, coef(), and you can find that there is by methods(class=garch) [1] coef.garch*

[R] latex function with lm

2006-06-21 Thread Erin Hodgess
Dear R People: I have used the latex function from the Hmisc package and it is just great! However, I have a new question regarding that function: is there an option for summary(lm(y~x)), please? There are options for different types of objects, but I didn't see one for that. Maybe I just

[R] png() or jpeg() in a php script

2006-06-21 Thread Angel Roman
Hello, I've got a problem with a PHP script, in which I call the system function (to call another processes). The call is : system(R --slave --vanilla path/to/source/source.R); if in this R file, I've got the lines: pdf(file=/path/to/file/file.pdf) commands dev.off() the pdf file is

Re: [R] png() or jpeg() in a php script

2006-06-21 Thread Prof Brian Ripley
This is covered (in at least three places) on the help page for those functions. PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html and do as we ask (including reporting your system, reading help pages and not sending HTML mail). On Wed, 21 Jun 2006, Angel Roman

Re: [R] latex function with lm

2006-06-21 Thread Dieter Menne
Erin Hodgess hodgess at gator.dt.uh.edu writes: I have used the latex function from the Hmisc package and it is just great! However, I have a new question regarding that function: is there an option for summary(lm(y~x)), please? There are options for different types of objects, but I

[R] sort matrix by sum of columns

2006-06-21 Thread Albert Vilella
Hi all, I would like to know how can I sort the cols of a matrix by the sum of their elements. a - matrix(as.integer(rnorm(25,4,2)),10,5) colnames(a) = c(alfa,bravo,charlie,delta,echo) I guess I should use colSums, and then rearrange the matrix somehow according to the result. My idea is to

Re: [R] sort matrix by sum of columns

2006-06-21 Thread Dimitris Rizopoulos
probably you're looking for ?order(), e.g., barplot(a[, order(colSums(a))], horiz = TRUE, legend.text = TRUE) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven,

Re: [R] sort matrix by sum of columns

2006-06-21 Thread Petr Pikal
Hi order is your friend On 21 Jun 2006 at 11:38, Albert Vilella wrote: From: Albert Vilella [EMAIL PROTECTED] To: r help r-help@stat.math.ethz.ch Date sent: Wed, 21 Jun 2006 11:38:17 +0100 Subject:[R] sort matrix by sum of

[R] IMSL Wrapper

2006-06-21 Thread Manoj
Dear All, Is there any Wrapper written around IMSL C libraries that makes it possible to access the IMSL C functions from within R? Any pointers would be greatly appreciated! Cheers Manoj __ R-help@stat.math.ethz.ch mailing list

Re: [R] IMSL Wrapper

2006-06-21 Thread Sundar Dorai-Raj
Manoj wrote: Dear All, Is there any Wrapper written around IMSL C libraries that makes it possible to access the IMSL C functions from within R? Any pointers would be greatly appreciated! Cheers Manoj What functions are you looking for? I'd be surprised if IMSL had

[R] submission

2006-06-21 Thread Burak Karacaoeren
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] latex function with lm

2006-06-21 Thread Frank E Harrell Jr
Erin Hodgess wrote: Dear R People: I have used the latex function from the Hmisc package and it is just great! However, I have a new question regarding that function: is there an option for summary(lm(y~x)), please? There are options for different types of objects, but I didn't see one

Re: [R] lmer and mixed effects logistic regression

2006-06-21 Thread Rick Bilonick
On Tue, 2006-06-20 at 20:27 +0200, Göran Broström wrote: On 6/19/06, Rick Bilonick [EMAIL PROTECTED] wrote: On Sun, 2006-06-18 at 13:58 +0200, Douglas Bates wrote: If I understand correctly Rick it trying to fit a model with random effects on a binary response when there are either 1 or 2

Re: [R] png() or jpeg() in a php script

2006-06-21 Thread Dieter Menne
Angel Roman aroman6 at gmail.com writes: I've got a problem with a PHP script, in which I call the system function (to call another processes). The call is : system(R --slave --vanilla path/to/source/source.R); ... but if I change the lines to: png(file=/path/to/file/file.png);

Re: [R] IMSL Wrapper

2006-06-21 Thread Liaw, Andy
From: Sundar Dorai-Raj Manoj wrote: Dear All, Is there any Wrapper written around IMSL C libraries that makes it possible to access the IMSL C functions from within R? Any pointers would be greatly appreciated! Cheers Manoj What functions are you

[R] rJava: java.lang.OutOfMemoryError

2006-06-21 Thread Greg thomas
Hi, Has anybody encountered the following problem? TIA, Gregoire library(rJava) .jinit() Error occurred during initialization of VM java.lang.OutOfMemoryError: unable to create new native thread This would not help: .jinit(parameters=c(-Xmx512m,-Xmx128m)) R and rJava versions are:

Re: [R] hello Excel... (native/Package/BETA)

2006-06-21 Thread Brahm, David
Hans-Peter, In my office, files are stored on an EMC shared server which is used by both our Windows PC's and our Linux machines. So it is common for us to process spreadsheet data using R on Linux. A Linux version of your package would be very welcome. Thanks! -- David Brahm ([EMAIL

Re: [R] expanded dataset and random number

2006-06-21 Thread Muhammad Subianto
Dear all, Per Jensen, thanks for your great help. All methods are very useful. Best, Muhammad Subianto On this day 20/06/2006 22:28, Per Jensen wrote: A couple of suggestions: #First solution mydatexpanded-mydat[rep(1:5,mydat[,1]),] sampledat-mydatexpanded[sample(1:85,7),-1] #Second

Re: [R] lmer and mixed effects logistic regression

2006-06-21 Thread Spencer Graves
You could think of 'lmer(..., family=binomial)' as doing a separate glm fit for each subject, with some shrinkage provided by the assumed distribution of the random effect parameters for each subject. Since your data are constant within subject, the intercept in your model without

[R] R Reference Card and other help (especially useful for Newbies)

2006-06-21 Thread Berton Gunter
Hi all: Happy summer solstice to all northern hemispherics (and winter solstice to the southerners). Newbies (and others!) may find useful the R Reference Card made available by Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through the Contributed link on CRAN (where

Re: [R] GAM selection error msgs (mgcv gam packages)

2006-06-21 Thread Simon Wood
My question concerns 2 error messages; one in the gam package and one in the mgcv package (see below). I have read help files and Chambers and Hastie book but am failing to understand how I can solve this problem. Could you please tell me what I must adjust so that the command does not

Re: [R] GARCH

2006-06-21 Thread Jeff Newmiller
Prof Brian Ripley wrote: Why do you think help.search(garch-methods, package=tseries) finds accessor functions? That is notation for S4 methods, and garch is an S3 class so there will be none. Here there _is_ an accessor, coef(), and you can find that there is by Probably because I

Re: [R] latex function with lm

2006-06-21 Thread Karl Ove Hufthammer
Erin Hodgess skreiv: However, I have a new question regarding that function: is there an option for summary(lm(y~x)), please?  There are options for different types of objects, but I didn't see one for that.  Maybe I just missed it. FWIW: I find that the following works fairly well for

[R] help on ploting various lines

2006-06-21 Thread Baoqiang Cao
Dear All, I tried to plot a variety of lines(curves) on same figure. What I did is, plot(x=x1,y=y1) lines(x=x2,y=y2) lines(x=x3,y=y3) ... In my data, the maximum of y1 is much smaller than those maximums of other y vectors. So, in the figure I got, there are some curves which are not complete,

Re: [R] latex function with lm

2006-06-21 Thread Karl Ove Hufthammer
Dieter Menne skreiv: I have written one (also form lme) in a library called Dmisc. It passes CRAN tests, but as it's a bit my personal taste, I have not submitted it to CRAN. Main feature is that reduces show number of digits per line by looking at the standard deviation. Too many people

Re: [R] help on ploting various lines

2006-06-21 Thread Marc Schwartz (via MN)
On Wed, 2006-06-21 at 12:22 -0400, Baoqiang Cao wrote: Dear All, I tried to plot a variety of lines(curves) on same figure. What I did is, plot(x=x1,y=y1) lines(x=x2,y=y2) lines(x=x3,y=y3) ... In my data, the maximum of y1 is much smaller than those maximums of other y vectors. So, in

Re: [R] help on ploting various lines

2006-06-21 Thread Marc Schwartz (via MN)
On Wed, 2006-06-21 at 11:55 -0500, Marc Schwartz (via MN) wrote: On Wed, 2006-06-21 at 12:22 -0400, Baoqiang Cao wrote: Dear All, I tried to plot a variety of lines(curves) on same figure. What I did is, plot(x=x1,y=y1) lines(x=x2,y=y2) lines(x=x3,y=y3) ... In my data, the

Re: [R] help on ploting various lines

2006-06-21 Thread Neuro LeSuperHéros
Hi. set a ylim equal to the max of your data: #create test data x1 - x2 -x3 -(1:10) y1 -runif(10)/2 #to get a low maximum y1 y2 -runif(10) y3 -runif(10) #plot as you did plot(x=x1,y=y1,type=l) #y-axis is not big enough lines(x=x2,y=y2) lines(x=x3,y=y3) #plot with minimum/maximum y limit

Re: [R] help on ploting various lines

2006-06-21 Thread Neuro LeSuperHéros
Sorry, had two y2 in the min/max ylim plot(x=x1,y=y1,type=l,ylim=c(min(y1,y2,y3),max(y1,y2,y3))) #fixed lines(x=x2,y=y2) lines(x=x3,y=y3) From: Baoqiang Cao [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: R-help@stat.math.ethz.ch Subject: [R] help on ploting various lines Date: Wed, 21 Jun

[R] rank(x,y)?

2006-06-21 Thread Duncan Murdoch
Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead to calculate the rank of each pair under the same ordering, but the rank() function doesn't take multiple values as input. Is

Re: [R] rank(x,y)?

2006-06-21 Thread John Fox
Dear Duncan, How about something like the following? rank2 - function(x, y){ x - (x - min(x))/diff(range(x)) y - (y - min(y))/diff(range(y)) rank(10*(x + 1) + y) } Regards, John On Wed, 21 Jun 2006 13:43:39 -0400 Duncan Murdoch [EMAIL PROTECTED] wrote: Suppose I have two

Re: [R] rank(x,y)?

2006-06-21 Thread Liaw, Andy
This might work for you: order(order(x, y)) [1] 1 3 6 7 2 4 5 8 Andy From: Duncan Murdoch Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead to calculate the rank of

Re: [R] rank(x,y)?

2006-06-21 Thread Peter Dalgaard
Duncan Murdoch [EMAIL PROTECTED] writes: Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead to calculate the rank of each pair under the same ordering, but the rank()

Re: [R] help on ploting various lines

2006-06-21 Thread Baoqiang Cao
Thank you very much Marc Schwartz and Neuro LeSuperHéros! At last I got what I expected, of course, with help of your messages. What a great day! Best, Cao __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Courses - R/Splus Advanced Programming in San Francisco This July ***by the R Development Core Tean Guru

2006-06-21 Thread elvis
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] rank(x,y)?

2006-06-21 Thread Duncan Murdoch
Peter Dalgaard wrote: Duncan Murdoch [EMAIL PROTECTED] writes: Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead to calculate the rank of each pair under the same

Re: [R] rank(x,y)?

2006-06-21 Thread Gabor Grothendieck
Try this: order(order(x,y)) On 6/21/06, Duncan Murdoch [EMAIL PROTECTED] wrote: Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead to calculate the rank of each pair under the

Re: [R] png() or jpeg() in a php script

2006-06-21 Thread [EMAIL PROTECTED]
Hi, I have created a OOP version of R_PHP Project, developed by Steve Chen, you can download the php script, here: http://www.juanantonio.info/p_research/statistics/r/rphp/RClass.1.0.zip ?php class R{ //Configuration Variables var $temp_dir; var $R_path; var

Re: [R] xyplot, type=b

2006-06-21 Thread Benjamin Tyner
Yes, this does work as long as the data are spaced far enough apart. If you peek inside ./main/plot.c, you will find the function 'do_plot_xy' which provides the functionality I desire for standard graphics. A down-and-dirty implementation for lattice might be along the lines of my.panel -

[R] Eclipse plugin for R code submit to Rserve available (Alpha)

2006-06-21 Thread Friedrich Schuster
Hello R-users and developers, This is the announce of a new Eclipse plugin for R. It is in its early (alpha) stage. It's GPL, source code is provided with the plugin. The update site is ready for install with eclipse 3.1 at : http://www.alysis.de/Rsubmit/update/ If you're interested, please

Re: [R] Comparing partial response curves from GAM

2006-06-21 Thread Simon Wood
Can you give a bit more information on exactly what you want to compare? (maybe give example models). There are ways of comparing curves, but it is a bit context dependent. - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY - +44 (0)1225 386603

Re: [R] gamm error message

2006-06-21 Thread Simon Wood
This is a bug. The `prior.weights' element of the the faked `gam' object (i.e. `test$gam$prior.wieghts' below) has been set to the varIdent() variance function, rather than the weights that this eventually represents. I'll fix this for the next patch release, (as soon as I get any time to do

[R] colClasses

2006-06-21 Thread Kerpel, John
Hi Folks! I'm reading in some data from a .csv file that has a date column. How do I use colClasses to get read.csv to recognize the date column? The documentation on this seems to be nil - And yes, I've read help and R Data Import/Export and can't figure out what the colClasses syntax

Re: [R] colClasses

2006-06-21 Thread Peter Dalgaard
Kerpel, John [EMAIL PROTECTED] writes: Hi Folks! I'm reading in some data from a .csv file that has a date column. How do I use colClasses to get read.csv to recognize the date column? The documentation on this seems to be nil - And yes, I've read help and R Data

Re: [R] colClasses

2006-06-21 Thread Kerpel, John
Peter: Thanks - I'll try both approaches. The examples clear things up a bit. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard Sent: Wednesday, June 21, 2006 3:04 PM To: Kerpel, John Cc: r-help@stat.math.ethz.ch Subject: Re: [R]

Re: [R] colClasses

2006-06-21 Thread jim holtman
Is this what you want: x - date,value + 2006-5-5,1 + 2006-5-10,2 + 2006-5-20,3 + 2006-5-30,4 y - textConnection(x) z - read.csv(y, colClasses=c(POSIXct, 'integer')) z date value 1 2006-05-05 1 2 2006-05-10 2 3 2006-05-20 3 4 2006-05-30 4 On 6/21/06, Kerpel, John

Re: [R] colClasses

2006-06-21 Thread Gabor Grothendieck
Peter has already directly answered your question but in case what you really want is a zoo time series object (applicable if this is a time series) then see the example in ?read.zoo in the zoo package. Also, library(zoo); vignette(zoo) gives info on zoo package. On 6/21/06, Kerpel, John

Re: [R] colClasses

2006-06-21 Thread Kerpel, John
Read.zoo did it! Thanks! -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 3:15 PM To: Kerpel, John Cc: r-help@stat.math.ethz.ch Subject: Re: [R] colClasses Peter has already directly answered your question but in case what you really

[R] Some R-Tcl/Tk-BWidget newbie questions.

2006-06-21 Thread JeeBee
Dear list, Could somebody who is more experienced with the Tcl/Tk interface from R please help me clarify the issues I've put below with ### -- tags? Several things go wrong, and it's probably because of messy code, but I have a difficult time finding out what is the cause. Thanks very much,

[R] effect size

2006-06-21 Thread Matthew Bridgman
Does anyone know a simple way of calculating effect sizes? Thanks MB __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] effect size

2006-06-21 Thread Frank E Harrell Jr
Matthew Bridgman wrote: Does anyone know a simple way of calculating effect sizes? Thanks MB Yes - the following formula is simple and fairly universal: 2 :-) -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics

Re: [R] effect size

2006-06-21 Thread Bruno L. Giordano
For ANOVA one option is the partial eta squared \eta^2_p: \eta^2_p=SSeffect/(SSeffect+SSerror) For multiple regression (continuous predictors) you might use the standardized parameter estimate, the regression coefficient you obtain standardizing the predictor: the larger the absolute value, the

[R] eliminating a do loop

2006-06-21 Thread Barker, Chris [SCIUS]
Using a by() statement, I am preparing ANOVA's for multiple experiments, and using simint() to generate confidence intervals. This works fine. simint.by.fit - by(analytes.dfr, list(Assay = analytes.dfr$analyte ), function(data) (simint(value ~ tx, data = data,type='Tukey' ) ) ) I can

Re: [R] lmer and mixed effects logistic regression

2006-06-21 Thread Rick Bilonick
On Wed, 2006-06-21 at 08:35 -0700, Spencer Graves wrote: You could think of 'lmer(..., family=binomial)' as doing a separate glm fit for each subject, with some shrinkage provided by the assumed distribution of the random effect parameters for each subject. Since your data are

Re: [R] IMSL Wrapper

2006-06-21 Thread Dirk Eddelbuettel
On 21 June 2006 at 09:36, Liaw, Andy wrote: | From: Sundar Dorai-Raj | Manoj wrote: | Dear All, | Is there any Wrapper written around IMSL C libraries | that makes | it possible to access the IMSL C functions from within R? | | Any pointers would be greatly

[R] Suggestion for ?split

2006-06-21 Thread Simon Blomberg
Hi all, I noticed an undocumented feature for split. It sorts the resulting list according to the grouping factor. An example: test - data.frame(x=rnorm(48), f=letters[sample(1:8)]) split(test, test$f) I wasn't expecting this behaviour, although I was pleasantly surprised. I suggest that the

Re: [R] IMSL Wrapper

2006-06-21 Thread Spencer Graves
I'd be extremely interested to know what Manoj wants from the IMSL library and how it compares with open source software available in R and elsewhere. Best Wishes, Spencer Graves Dirk Eddelbuettel wrote: On 21 June 2006 at 09:36, Liaw, Andy wrote: | From:

Re: [R] eliminating a do loop

2006-06-21 Thread ronggui
Have you tried these: png() lapply(simint.by.fit,plot) dev.off() 2006/6/22, Barker, Chris [SCIUS] [EMAIL PROTECTED]: Using a by() statement, I am preparing ANOVA's for multiple experiments, and using simint() to generate confidence intervals. This works fine. simint.by.fit -

Re: [R] IMSL Wrapper

2006-06-21 Thread Manoj
Dear All, Thanks for your replies and interest so far. I guess R pretty much covers most of what imsl offers but the area that I really wanted to test imsl out was in the optimization functions. Though the imsl functions are not as rich as NUOPT (which is quite expensive) , imsl c v6

[R] How to plot a image with restrictions?

2006-06-21 Thread Cleber N.Borges
Hello All! How to plot a image ( image function ) with restrictions, like a polygon?? Thanks in advance! Cleber N. Borges # problem example x - y - seq(-4*pi, 4*pi, len=27) r - sqrt(outer(x^2, y^2, +)) image( z ) contour(z, add = TRUE, drawlabels = FALSE) m=scan() 0.2 0.2 0.8 0.2

Re: [R] rank(x,y)?

2006-06-21 Thread Gabor Grothendieck
On 6/21/06, Duncan Murdoch [EMAIL PROTECTED] wrote: Peter Dalgaard wrote: Duncan Murdoch [EMAIL PROTECTED] writes: Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead