Re: [R] Testing for S4 objects

2004-11-26 Thread Martin Maechler
JohnF == John Fox [EMAIL PROTECTED] on Thu, 25 Nov 2004 22:28:50 -0500 writes: JohnF Dear r-help list members, Is there a way to test JohnF whether an object is an S4 object? The best that I've JohnF been able to come up with is JohnF isS4object - function(object)

[R] multiple logistic regression

2004-11-26 Thread Anne Piotet
Dear R helpers! Is there an utility for multiple logistic regression where the response is not ordinal? As the predictors do not satisfy the necessary hypothesis, I cannot use discriminant analysis. Thanks and have a nice R-day Anne [[alternative HTML version deleted]]

Re: [R] Making legend() look like my plot()

2004-11-26 Thread Martin Maechler
Dan == Dan Bolser [EMAIL PROTECTED] on Thu, 25 Nov 2004 22:35:22 + (GMT) writes: Dan On Thu, 25 Nov 2004, Uwe Ligges wrote: Dan Bolser wrote: Is this an impossible task? How about just problem 2 below, having one pch in one legend entry, but no pch in the

[R] conditional replacement - readLines

2004-11-26 Thread Christian Schulz
Hi, i have list with 2575 cgi files which i have read with readLines - all Lines have the type chr. Now i want replace the 2. line with a condition in 4. line and write the files back to dir. How i could avoid the incompatible problem, or is it better doing something with awk!? for (i in

Re: [R] multiple logistic regression

2004-11-26 Thread Prof Brian Ripley
multinom() in package nnet. On Fri, 26 Nov 2004, Anne Piotet wrote: Is there an utility for multiple logistic regression where the response is not ordinal? As the predictors do not satisfy the necessary hypothesis, I cannot use discriminant analysis. -- Brian D. Ripley, [EMAIL

[R] Modes again

2004-11-26 Thread Gregor GORJANC
Hello! I write once more. I slightly modified your code Ross and now it returns all modes from the distribution. I changed the name of the funtion to distinguish the difference. I do not like the name simpleMode, however mode is already taken by another function (The (Storage) Mode of an

Re: [R] Making legend() look like my plot()

2004-11-26 Thread Dan Bolser
On Fri, 26 Nov 2004, Martin Maechler wrote: Dan == Dan Bolser [EMAIL PROTECTED] on Thu, 25 Nov 2004 22:35:22 + (GMT) writes: Dan On Thu, 25 Nov 2004, Uwe Ligges wrote: Dan Bolser wrote: Is this an impossible task? How about just problem 2 below, having one pch

Re: [R] Error using glm with poisson family and identity link

2004-11-26 Thread Ted Harding
On 26-Nov-04 Prof Brian Ripley wrote: On Thu, 25 Nov 2004, Spencer Graves wrote: I generally avoid constrained optimizers for three reasons: 1. My experience with them has included many cases where the optimizer would stop with an error when testing parameter values that violate the

[R] unexpected behaviour of 'curve' function

2004-11-26 Thread Guazzetti Stefano
Dear all, curve(x^3*(1-x)^7, from = 0, to = 1) works as expected but, omitting the xlim or the to and from arguments and calling curve more than once: par(mfrow = c(2,2)) for (i in 1:4) curve(x^3*(1-x)^7) gives an expected (al least to me) result. Note also that a pu object is returned by

Re: [R] LDA with previous PCA for dimensionality reduction

2004-11-26 Thread Ramon Diaz-Uriarte
Dear Cristoph, David, Torsten and Bjørn-Helge, I think that Bjørn-Helge has made more explicit what I had in mind (which I think is close also to what David mentioned). As well, at the very least, not placing the PCA inside the cross-validation will underestimate the variance in the

Re: [R] Making legend() look like my plot()

2004-11-26 Thread Uwe Ligges
Dan Bolser wrote: On Fri, 26 Nov 2004, Martin Maechler wrote: Dan == Dan Bolser [EMAIL PROTECTED] on Thu, 25 Nov 2004 22:35:22 + (GMT) writes: Dan On Thu, 25 Nov 2004, Uwe Ligges wrote: Dan Bolser wrote: Is this an impossible task? How about just problem 2 below, having one

Re: [R] Error using glm with poisson family and identity link

2004-11-26 Thread Federico Gherardini
Thanks very much to everybody for your replies and comments! Cheers, Federico __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] R information

2004-11-26 Thread Catherine Eng
Hello everybody, I'm a beginner to R language. That's why I have some questions deal with graphs. In fact, I would like to know if it is possible to draw a plot with 2 y axis against x axis (like gnuplot with the function replot)? In fact, I would like to plot in y1 axis, a temperature value for

Re: [R] unexpected behaviour of 'curve' function

2004-11-26 Thread Peter Dalgaard
Guazzetti Stefano [EMAIL PROTECTED] writes: Dear all, curve(x^3*(1-x)^7, from = 0, to = 1) works as expected but, omitting the xlim or the to and from arguments and calling curve more than once: par(mfrow = c(2,2)) for (i in 1:4) curve(x^3*(1-x)^7) gives an expected (al least

[R] problem of writting large data into files

2004-11-26 Thread Hu Chen
Hi all. I used to use write.table() to write data into file. However , it seems that write.table() waste a lot of memory on caching temporary variables. Thus it ofen fails on writting larg matrix/frame into file. I noticed that write.matrix() may be better. But how could I write the column names

Re: [R] problem of writting large data into files

2004-11-26 Thread Uwe Ligges
Hu Chen wrote: Hi all. I used to use write.table() to write data into file. However , it seems that write.table() waste a lot of memory on caching temporary variables. Thus it ofen fails on writting larg matrix/frame into file. I noticed that write.matrix() may be better. But how could I write the

[R] Generating R wrapper for C++ code.

2004-11-26 Thread M.Kondrin
Hello! I have an intention of making a R-wrapper for VTK library ( www.kitware.com ). The libray itself is quite extensive so write an R/C code for the wrapper by hand seems to be impossible. VTK library has automatically generated wrappers for Python and Tcl so generating code for just

Re: [R] R information

2004-11-26 Thread Uwe Ligges
Catherine Eng wrote: Hello everybody, I'm a beginner to R language. That's why I have some questions deal with graphs. In fact, I would like to know if it is possible to draw a plot with 2 y axis against x axis (like gnuplot with the function replot)? In fact, I would like to plot in y1 axis, a

RE: [R] Testing for S4 objects

2004-11-26 Thread John Fox
Dear Martin, In the context I had in mind (for the Rcmdr package), I can insure that the methods package is present. Thanks for the information. John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604

[R] plotting multiple series in one plot

2004-11-26 Thread Apoian, Zack
say we have: x-data.frame(a=c(1,2,3,4,5),b=c(1,1,1.5,2,2)) y-data.frame(a=c(1,2,3,4,5),b=c(1,2,2,3,3)) How would I plot this so that, with the shared $a as the x-axis values, I have both $b columns plotted together? (a comparison of the two?) thanks. DISCLAIMER: This e-mail message and any

[R] Multivariate t - parameter estimation

2004-11-26 Thread Ian Jonsen
Hi There, I would like to estimate the parameters of a multi-variate t-distribution from a series of bivariate data. Can anyone suggest how this might be done in R? I typically use nlm() for fitting univariate distributions. Thanks, Ian -- Ian Jonsen, Postdoctoral Fellow Biology Dept.,

Re: [R] plotting multiple series in one plot

2004-11-26 Thread Dimitris Rizopoulos
Hi Zack, you mean something like: matplot(x$a, as.matrix(cbind(x$b, y$b)), lty=1:2, type=l) legend(1, 2.5, c(b.x, b.y), lty=1:2, col=1:2) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address:

[R] Multi-figure plotting

2004-11-26 Thread Stefaan Lhermitte
Dear R-ians, I have a question concerning plotting different plots on one figure. I have written a script to plot an image, a legend (based on different rectangles) and a timeseries plot on one figure. In my R-lagnuage it looks like this (without arguments that are not usefull for my question):

[R] hist and truehist

2004-11-26 Thread Gregor GORJANC
Hello! Up to now I have been using hist() to display the distributions. Howevere, I noteiced strange numbers on y (vertical) axis, if I used probability = T or freq = F option. I thought it is a bug and launched the R-bug system and found some posts on that matter. Brian Ripley responded to

Re: [R] plotting multiple series in one plot

2004-11-26 Thread Gabor Grothendieck
Apoian, Zack Zack.Apoian at sac.com writes: : : say we have: : : x-data.frame(a=c(1,2,3,4,5),b=c(1,1,1.5,2,2)) : y-data.frame(a=c(1,2,3,4,5),b=c(1,2,2,3,3)) : : How would I plot this so that, with the shared $a as the x-axis values, I : have both $b columns plotted together? (a comparison

Re: [R] hist and truehist

2004-11-26 Thread Peter Dalgaard
Gregor GORJANC [EMAIL PROTECTED] writes: Hello! Up to now I have been using hist() to display the distributions. Howevere, I noteiced strange numbers on y (vertical) axis, if I used probability = T or freq = F option. I thought it is a bug and launched the R-bug system and found some posts

Re: [R] barplot(2?) with CI from a zero reference line

2004-11-26 Thread Marc Schwartz
On Fri, 2004-11-26 at 07:56 +0100, Jean-Louis Abitbol wrote: Dear R Users, (and dear Marc) First of all many thanks for the answers to my previous questions. I would like to barplot the mean percent change of a variate with it's CI. Bars should start from the zero reference line to height

[R] Tcl error - brace in argument?

2004-11-26 Thread Matthew Dowle
Hi all, Does anyone know a solution for this error ? tkwidget(dlg, iwidgets::spinint, range={0 23}) Error in structure(.External(dotTclObjv, objv, PACKAGE = tcltk), class = tclObj) : [tcl] wrong # args: should be .31.1.19 configure -range {begin end}. Thanks, Matthew

[R] (no subject)

2004-11-26 Thread Angela Re
Good afternoon, I'd like to know how to superimpose a Student distribution pt on a histogram. I think I have to use the plot function but I don,t know the details. Other question: what is a quntile function? Can you help me? Thank you. __ [EMAIL

Re: [R] Tcl error - brace in argument?

2004-11-26 Thread Peter Dalgaard
Matthew Dowle [EMAIL PROTECTED] writes: Hi all, Does anyone know a solution for this error ? tkwidget(dlg, iwidgets::spinint, range={0 23}) I suspect you want range=as.tclObj(c(0,23)) or something like that, i.e. a Tcl list of two numbers, not a five-character string. Error in

No answer, Was Re: [R] (no subject)

2004-11-26 Thread Peter Dalgaard
Angela Re [EMAIL PROTECTED] writes: [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Please do. You have been told before. -- O__ Peter Dalgaard Blegdamsvej 3 c/

Re: [R] Tcl error - brace in argument?

2004-11-26 Thread Peter Dalgaard
Peter Dalgaard [EMAIL PROTECTED] writes: Matthew Dowle [EMAIL PROTECTED] writes: Hi all, Does anyone know a solution for this error ? tkwidget(dlg, iwidgets::spinint, range={0 23}) I suspect you want range=as.tclObj(c(0,23)) or something like that, i.e. a Tcl list of two

RE: [R] (no subject)

2004-11-26 Thread Rau, Roland
Hi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angela Re Sent: Friday, November 26, 2004 5:26 PM To: [EMAIL PROTECTED] Subject: [R] (no subject) I'd like to know how to superimpose a Student distribution pt on a histogram. I think I have to use the

RE: [R] (no subject)

2004-11-26 Thread Ted Harding
On 26-Nov-04 Angela Re wrote: Good afternoon, I'd like to know how to superimpose a Student distribution pt on a histogram. I think I have to use the plot function but I don,t know the details. x-rt(5000,4) # draw a sample from t with df=4 hist(x,breaks=0.5*(-40:40)) #

[R] sorting a data.frame using a vector

2004-11-26 Thread Toralf Kirsten
Hi all, I'm looking for an efficient solution (speed and memory) for the following problem: Given - a data.frame x containing numbers of type double with nrow(x)ncol(x) and unique row lables and - a character vector y containing a sorted order labels Now, I'd like to sort the rows of the

Re: [R] sorting a data.frame using a vector

2004-11-26 Thread Peter Dalgaard
Toralf Kirsten [EMAIL PROTECTED] writes: Hi all, I'm looking for an efficient solution (speed and memory) for the following problem: Given - a data.frame x containing numbers of type double with nrow(x)ncol(x) and unique row lables and - a character vector y containing a sorted order

[R] Coplot Given text

2004-11-26 Thread Mihai Nica
Greetings: I am unsuccessful in suppressing Given : myvariable from a coplot. There was such a question in the past but the thread breaks down. I am sure this is a for dummies question :-). I tried: coplot(myvar~myvar | myvar, show.given=FALSE, xlab=, ylab=..., main= ) and some other

[R] problem with xyplot

2004-11-26 Thread Carlisle Thacker
Dear Rlisters, When trying to indicate which data belong to which of 7 groups, the following plot shows only 5 groups: ss - trellis.par.get(superpose.symbol) ss$col - c(red,blue,green,yellow,orange,magenta,cyan) ss$pch - format(1:7) ss$cex - 1.2 ss - trellis.par.get(background) ss$col - white

Re: [R] problem with xyplot

2004-11-26 Thread Deepayan Sarkar
On Friday 26 November 2004 11:58, Carlisle Thacker wrote: Dear Rlisters, When trying to indicate which data belong to which of 7 groups, the following plot shows only 5 groups: ss - trellis.par.get(superpose.symbol) ss$col - c(red,blue,green,yellow,orange,magenta,cyan) ss$pch - format(1:7)

Re: [R] help with glmmPQL

2004-11-26 Thread Spencer Graves
HI, DOUG JOSE: Is there some reason that anova.lme should NOT accept an object of class glmmPQL in the example below? If you don't see one either, then I suggest you consider modifying the code as described below. HI, ANDREW: I couldn't find your data learning in my Windows

Re: [R] help with glmmPQL

2004-11-26 Thread Deepayan Sarkar
On Friday 26 November 2004 12:35, Spencer Graves wrote: HI, DOUG JOSE: Is there some reason that anova.lme should NOT accept an object of class glmmPQL in the example below? If you don't see one either, then I suggest you consider modifying the code as described below. HI, ANDREW:

Re: [R] help with glmmPQL

2004-11-26 Thread Spencer Graves
Hi, Deepayan: Thanks much. That's very helpful. ANDREW: How difficult would it be for you to generate a Monte Carlo to simulate data according to your two models, e.g., y ~ trt and y ~ trt + I(week 2)? If you did that, you could then fit both models to each set of simulated data,

Re: [R] Coplot Given text

2004-11-26 Thread Robert W. Baer, Ph.D.
Does this do what you want? coplot(myvar~myvar | myvar, show.given=FALSE, ylab=, xlab=c(...,A Title on Top)) Rob - Original Message - From: Mihai Nica [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 26, 2004 11:30 AM Subject: [R] Coplot Given text Greetings: I am

Re: [R] help with glmmPQL

2004-11-26 Thread Douglas Bates
Spencer Graves wrote: HI, DOUG JOSE: Is there some reason that anova.lme should NOT accept an object of class glmmPQL in the example below? If you don't see one either, then I suggest you consider modifying the code as described below. I don't think that would be appropriate. AFAIK the

[R] Arguments macthing

2004-11-26 Thread Stephane DRAY
Hello list, I have a question concerning argument matching I have read R Language Definition before). I have a function multxby2 which takes as argument the call to another function f1. I would like to take the values of xx from the call to f1 and use it in multxby2. Here is an example:

Re: [R] Arguments matching

2004-11-26 Thread Stephane DRAY
I have the answer using match.call: multxby2 - function(callf) { appel1-match.call() appel-as.list(match.call(eval(appel1$callf[[1]]),call=as.call(appel1$callf))) print(appel) px-pmatch(names(appel),xx) if(sum(is.na(px))!=length(appel)) print(appel[[which(!is.na(px))]]*2)

Re: [R] unexpected behaviour of 'curve' function

2004-11-26 Thread Duncan Murdoch
On 26 Nov 2004 12:27:35 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: Guazzetti Stefano [EMAIL PROTECTED] writes: Dear all, curve(x^3*(1-x)^7, from = 0, to = 1) works as expected but, omitting the xlim or the to and from arguments and calling curve more than once: par(mfrow =

Re: [R] unexpected behaviour of 'curve' function

2004-11-26 Thread Duncan Murdoch
On Fri, 26 Nov 2004 18:48:45 -0500, Duncan Murdoch [EMAIL PROTECTED] wrote: On 26 Nov 2004 12:27:35 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: Having pu end up in the global environment looks like a bug in delay() but I don't think it has any influence on this particular effect. That's a

Re: [R] unexpected behaviour of 'curve' function

2004-11-26 Thread Peter Dalgaard
Duncan Murdoch [EMAIL PROTECTED] writes: Oops, not a bug, behaving as documented (but maybe a design flaw)? delay() is documented as defaulting to the global environment. curve() should have used env=environment(). Or not used delay() at all. That code looks a bit warped. AFAICT, you could

[R] Problems

2004-11-26 Thread agripino lima
Hi I'm using R v2.01 and my OS is Windows 98.I'm having problems using the function 'spectrum' for a bivariate time series.The problem is no matter what series I use, the values of $coh is always 1.Am I doing something wrong? Thanks -

Re: [R] an R function to search on Prof. Baron's site

2004-11-26 Thread Tom Mulholland
The problem appears to be associated with the | in Rhelp00/archive|Rhelp01/archive|Rhelp02a/archive. When you run the function in Firefox with restrict set to doc it gives the right response. This function eventually uses system. So I decided to see if I could get this to work by hand using

RE: [R] help with glmmPQL

2004-11-26 Thread John Fox
Dear Doug, I assume that in the absence of a suitable anova() method, there's nothing wrong with testing the difference between two GLMM objects nested in their random effects by manually comparing the log-likelihoods as printed or returned by logLik(). Is that correct? Regards, John

Re: [R] Coplot Given text

2004-11-26 Thread Mihai Nica
Oh yes, many thanks! It does appear if I type coplot but I just didn't put it together... I never imagined it has anything to do with xlab... Mihai Nica Jackson State University 155 B Parkhurst Dr. Jackson, MS 39202 601 969 5423 601 914 0361 - Original Message - From: Robert W. Baer,

RE: [R] sorting a data.frame using a vector

2004-11-26 Thread Liaw, Andy
From: Peter Dalgaard Toralf Kirsten [EMAIL PROTECTED] writes: Hi all, I'm looking for an efficient solution (speed and memory) for the following problem: Given - a data.frame x containing numbers of type double with nrow(x)ncol(x) and unique row lables and - a character

RE: [R] R-2.0.1 reinstall non-CRAN pkg

2004-11-26 Thread Liaw, Andy
Have you checked where R is looking for that package (.libPaths() would tell you), and whether that's where you've installed it? HTH, Andy From: Anthony Westerling I am trying to upgrade to R-2.0.1 from R-1.9 on a Mac running OS X 10.3. I have some simple packages I wrote myself that

[R] Storing loop output from a function

2004-11-26 Thread Andrew Kniss
I am attempting to write an R function to aid in time series diagnostics. The tsdiag() works well, but I would prefer to get a plot with ACF, PACF, and Ljung-Box p-values of residuals. In my attempt to get to that point, I am writing a function to calculate Ljung-Box p-values for residuals at

Re: [R] R-2.0.1 reinstall non-CRAN pkg

2004-11-26 Thread Anthony Westerling
Yes. It is looking the correct directory. Note that the package is installed without errors. The problem is that, even after being newly reinstalled, it is still not recognized as a valid package for R-2.0 Tony On Nov 26, 2004, at 9:08 PM, Liaw, Andy wrote: Have you checked where R is