Re: [R] anova.lme error

2005-06-15 Thread Prof Brian Ripley
You have already (incorrectly) filed this a bug report on *anova* and been asked to read the R FAQ and discuss this with the package maintainer. Please do as we ask: only package maintainers can change contributed packages (here nlme). On Tue, 14 Jun 2005, Nisha Mulakken wrote: Hi, I am

Re: [R] Puzzled in utilising summary.lm() to obtain Var(x)

2005-06-15 Thread Prof Brian Ripley
On Wed, 15 Jun 2005, Ajay Narottam Shah wrote: I have a program which is doing a few thousand runs of lm(). Suppose it is a simple model y = a + bx1 + cx2 + e I have the R object d where d - summary(lm(y ~ x1 + x2)) I would like to obtain Var(x2) out of d. How might I do it? I can,

[R] Interpolate a matrix z=f(x,y)

2005-06-15 Thread Naji
Hi all, I want to interpolate a matrix as function of its row and column coordinates, i.e. {u,v,w}=spline2d(x,y,z...) Where u v are the new coordinates values and w the matrix extrapolated Best regards Naji __ R-help@stat.math.ethz.ch mailing list

[R] Anohter anova.mlm problem

2005-06-15 Thread Bela Bauer
Hi, yet another anova.mlm problem - it doesn't seem to end. This time, I have a setup with a few within-subject factors and a between-subject factor (SGROUP). Consider the most simple case with only one within-factor (apo): mlmfit0 - lm(data.n ~ 0 + SGROUP) mlmfit1 - lm(data.n ~ 1 + SGROUP)

[R] (no subject)

2005-06-15 Thread Markus Schwarz
Are there functions available computing the gamma-correlation for ordinal scaled variables and kappa-accuracy for nominal variables, thanks, Mark ... Swiss Federal Institute for Forest, Snow and Landscape Research

[R] Plotting second axes outside xyplot

2005-06-15 Thread Andrew Robinson
Hi all, I'm trying to find a way to get xyplot to produce a second set of axes outside the right hand side of the graph. This is my progress so far: EE - equal.count(ethanol$E, number=9, overlap=1/4) xyplot(NOx ~ C | EE, data = ethanol, prepanel = function(x, y) prepanel.loess(x, y,

[R] Graph with values of coordinates of points in x axis

2005-06-15 Thread Massimiliano Tripoli
Hi all, I want to draw a line with the values of x marked in X axis. I tried with x - c(0,6,12,18,24,30) #coordinates of points x y - c(2,5,7,5,7,16) #coordinates of points y plot(x,type=n,xlab=Months,ylab=Y values,main=main,ylim=c(0,16),xlim=c(0,30)) lines(x,y) The graph shows by default

[R] Possible bug in file.choose() - how to tell?

2005-06-15 Thread Hans-Peter
Hi, I run a script file by dropping it on a windows batch file that runs R in --slave modus. In a subfunction there is the call to file.choose(). The problem is, that the dialog does show only folders but no files at all. It's quite strange: a) without --slave modus the files are shown, b) when I

[R] R: Graph with values of coordinates of points in x axis

2005-06-15 Thread Guazzetti Stefano
try: plot(x, y, type=l, xlab=Months, xaxt=n, ylab=Y values) axis(1, at=0:5*6) Stefano -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] conto di Massimiliano Tripoli Inviato: mercoledì 15 giugno 2005 10.35 A: r-help@stat.math.ethz.ch

Re: [R] Graph with values of coordinates of points in x axis

2005-06-15 Thread Romain Francois
Le 15.06.2005 10:35, Massimiliano Tripoli a écrit : Hi all, I want to draw a line with the values of x marked in X axis. I tried with x - c(0,6,12,18,24,30) #coordinates of points x y - c(2,5,7,5,7,16) #coordinates of points y plot(x,type=n,xlab=Months,ylab=Y

Re: [R] Possible bug in file.choose() - how to tell?

2005-06-15 Thread Prof Brian Ripley
OS? R version? Locale? This is a known problem with R 2.1.0 on Windows in some locales, solved long ago in R-patched. On Wed, 15 Jun 2005, Hans-Peter wrote: Hi, I run a script file by dropping it on a windows batch file that runs R in --slave modus. In a subfunction there is the call to

[R] Reading Excel files...Error

2005-06-15 Thread Vivek Subramanian
hi, i am using the RODBC package to read .xls files. now after i installed the package and loaded the library and tried to read a file this is the error i got. channel-odbcConnect(D:/rstuff/1.xls) Warning messages: 1: [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager]

Re: [R] Puzzled in utilising summary.lm() to obtain Var(x)

2005-06-15 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes: On Wed, 15 Jun 2005, Ajay Narottam Shah wrote: I have a program which is doing a few thousand runs of lm(). Suppose it is a simple model y = a + bx1 + cx2 + e I have the R object d where d - summary(lm(y ~ x1 + x2)) I would like

Re: [R] Anohter anova.mlm problem

2005-06-15 Thread Peter Dalgaard
Bela Bauer [EMAIL PROTECTED] writes: Hi, yet another anova.mlm problem - it doesn't seem to end. This time, I have a setup with a few within-subject factors and a between-subject factor (SGROUP). Consider the most simple case with only one within-factor (apo): mlmfit0 - lm(data.n ~ 0 +

[R] Setting environment variables (installation problem)

2005-06-15 Thread Thomas Unternaehrer
Dear All, Is it possible under WinXP to set the R binary path (...\R\bin) as an environment variable during installation? (rw2010.exe) The problem is that I've written a program that needs to know the path of Rterm.exe during installation. At the moment the user can't choose the R installation

[R] Chi square convolution?

2005-06-15 Thread Roy Werkman
Hi, I want to determine the confidence interval on the sum of two sigma's. Is there an easy way to do this in R? I guess I have to use some sort of chisquare convolution algorithm??? Thanx, Roy -- The information contained in this communication and any atta...{{dropped}}

Re: [R] update.packages() - gregmisc

2005-06-15 Thread Muhammad Subianto
On this day 6/15/2005 12:03 AM, Gabor Grothendieck wrote: Is the code in your post intended to show what worked so others will know what to do Yes, I succes to remove and install gregmisc again like I have posted before. Regards, Muhammad Subianto or is that code intended to show what you

[R] ploting error

2005-06-15 Thread javier garcia
Hello! I've tried to execute an R script that I used to use with older versions with no problem. In the scrip ,I try to create a series of plots in png format, and now there is an error (my actual verion is R2.0.1) Error in title(main=main,sub=sub,xlab=xlab,ylab=ylab,...): X11 font at size 14

Re: [R] Possible bug in file.choose() - how to tell?

2005-06-15 Thread Hans-Peter
2005/6/15, Prof Brian Ripley [EMAIL PROTECTED]: OS? R version? Locale? Win2000, SP4 - 2.1.0 - LC_COLLATE=German_Switzerland.1252; LC_CTYPE=German_Switzerland.1252; LC_MONETARY=German_Switzerland.1252; LC_NUMERIC=C;LC_TIME=German_Switzerland.1252 This is a known problem with R 2.1.0 on

[R] umlauts in Rd files

2005-06-15 Thread Robin Hankin
Hi I'm having difficulty following the advice in section 2.7 of R-exts. In one of my packages, there is a function called mobius(). I want to refer to it in the Rd file as the Möbius function, and to illustrate the Möbius inversion formula (just to be explicit: this is Mobius but with two

Re: [R] ploting error

2005-06-15 Thread Carlos Ortega
Hello Javier, Please if you can provide more details about the script you are using, we can help you out more effectively. Thanks, Carlos Ortega. On 6/15/05, javier garcia [EMAIL PROTECTED] wrote: Hello! I've tried to execute an R script that I used to use with older versions with no

Re: [R] us zipcode data map

2005-06-15 Thread Tom Short
My new task (which I have not investigated yet) is to see if facilities exist in R to turn the X11 device into an HTML document with an html-map or into a PDF with hyperlinks. To create an HTML imagemap, see B. Rowlingson's imagemap package at:

Re: [R] Reading Excel files...Error

2005-06-15 Thread Uwe Ligges
Vivek Subramanian wrote: hi, i am using the RODBC package to read .xls files. now after i installed the package and loaded the library and tried to read a file this is the error i got. channel-odbcConnect(D:/rstuff/1.xls) D:/rstuff/1.xls is not a DSN. Probably you are going to use

[R] Finding local minima and maxima

2005-06-15 Thread Sean Davis
I have data in the form of (x,y) pairs and would like to find local minima and maxima (typically the zeros of the 2nd derivative) of the y values. I looked at numericDeriv, but I don't have an expression per se. I looked at optim, also, but it looks like it will find only one global max or

Re: [R] Reading Excel files...Error

2005-06-15 Thread Tuszynski, Jaroslaw W.
If you need work-around, than you can always save excel file in csv format and than read that. See 'read.csv' or 'read.csv2'. Jarek \=== Jarek Tuszynski, PhD. o / \ Science Applications International

Re: [R] Possible bug in file.choose() - how to tell?

2005-06-15 Thread Prof Brian Ripley
On Wed, 15 Jun 2005, Hans-Peter wrote: 2005/6/15, Prof Brian Ripley [EMAIL PROTECTED]: OS? R version? Locale? Win2000, SP4 - 2.1.0 - LC_COLLATE=German_Switzerland.1252; LC_CTYPE=German_Switzerland.1252; LC_MONETARY=German_Switzerland.1252; LC_NUMERIC=C;LC_TIME=German_Switzerland.1252

Re: [R] Finding local minima and maxima

2005-06-15 Thread Uwe Ligges
Sean Davis wrote: I have data in the form of (x,y) pairs and would like to find local minima and maxima (typically the zeros of the 2nd derivative) of the y values. I looked at numericDeriv, but I don't have an expression per se. I looked at optim, also, but it looks like it will find

Re: [R] Setting environment variables (installation problem)

2005-06-15 Thread Prof Brian Ripley
It is unclear what you want to do, but it is clear that this is not the appropriate list (see the posting guide) and that your subject line is misleading. Note that the path to R is normally entered in the registry during installation, but this is optional as some users have a read-only

[R] X11 font problem (was Re: ploting error)

2005-06-15 Thread Prof Brian Ripley
On Wed, 15 Jun 2005, javier garcia wrote: I've tried to execute an R script that I used to use with older versions with no problem. In the scrip ,I try to create a series of plots in png format, and now there is an error (my actual verion is R2.0.1) Error in

Re: [R] plots

2005-06-15 Thread Uwe Ligges
secretario academico FACEA wrote: Dear all, Is it possible to change the levels in a mosaic plot, Change the levels? This depends on the data, not on the plot function, I think... the appearance of the level What does apprearance mean? See ?mosaicplot which tells you how to re-order

Re: [R] umlauts in Rd files

2005-06-15 Thread Peter Dalgaard
Robin Hankin [EMAIL PROTECTED] writes: Hi I'm having difficulty following the advice in section 2.7 of R-exts. In one of my packages, there is a function called mobius(). I want to refer to it in the Rd file as the Möbius function, and to illustrate the Möbius inversion formula

[R] Resolved - Re: X11 font problem (was Re: ploting error)

2005-06-15 Thread javier garcia
Thanks you very much, Prof Ripley. My actual version is 2.1.0 (I was confused). The problem was exactly that one. I've installed the 100dpi fonts and now there is no problem. Thanks and best regards, Javier - El Miércoles, 15 de Junio de 2005 14:28, Prof Brian Ripley escribió:

Re: [R] Gamma and Kappa Functions? was: (no subject)

2005-06-15 Thread Marc Schwartz
On Wed, 2005-06-15 at 10:16 +0200, Markus Schwarz wrote: Are there functions available computing the gamma-correlation for ordinal scaled variables and kappa-accuracy for nominal variables, thanks, Mark Mark, Please use a meaningful subject. 1. For Gamma: A. See the rcorr.cens()

Re: [R] Reading Excel files...Error

2005-06-15 Thread Dirk Eddelbuettel
Tuszynski, Jaroslaw W. JAROSLAW.W.TUSZYNSKI at saic.com writes: If you need work-around, than you can always save excel file in csv format and than read that. See 'read.csv' or 'read.csv2'. Or use read.xls() from Greg's gdata package on CRAN. Gdata embeds Perl code for reading xls files.

Re: [R] umlauts in Rd files

2005-06-15 Thread Prof Brian Ripley
On Wed, 15 Jun 2005, Peter Dalgaard wrote: Robin Hankin [EMAIL PROTECTED] writes: Hi I'm having difficulty following the advice in section 2.7 of R-exts. In one of my packages, there is a function called mobius(). I want to refer to it in the Rd file as the Möbius function, and to

[R] how to change automatically 0=no and 1=yes

2005-06-15 Thread Muhammad Subianto
Dear R-helpers, I have dataset (data.frame) like below, x1 x2 x3 x4 x5 x6 x7 x8 x9 ... x1200 000110011 100110011 010110011 110110011 ... How

[R] Calling C function from Fortran

2005-06-15 Thread Gilles GUILLOT
The example in the R doc and the hints from Shusong Jin , Ingmar Visser and Reid Huntsinger (thanks all three) refer to the case where the function does not have arguments. I'm still looking for a proper sequence of commands to call C functions with arguemnts from R. Imagine I want to

Re: [R] how to change automatically 0=no and 1=yes

2005-06-15 Thread Sean Davis
x - data.frame(matrix(c(1,0,1,0,1,1),nrow=3)) x[x==0] - 'no' x[x==1] - 'yes' x X1 X2 1 yes no 2 no yes 3 yes yes On Jun 15, 2005, at 9:58 AM, Muhammad Subianto wrote: Dear R-helpers, I have dataset (data.frame) like below, x1 x2 x3 x4 x5 x6 x7 x8 x9 ... x1200

Re: [R] how to change automatically 0=no and 1=yes

2005-06-15 Thread Dimitris Rizopoulos
try this: dat - data.frame(matrix(sample(0:1, 100 * 20, TRUE), 100, 20)) dat[] - lapply(dat, factor, levels = c(0, 1), labels = c(no, yes)) dat I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic

Re: [R] Finding local minima and maxima

2005-06-15 Thread Sean Davis
Thanks, Uwe. Actually, I didn't mean to make this complicated--simple vector x and values at x in a vector y. Just wanted to determine the local minima and maxima of y[x], but y is not continuous (but is a smooth function of x). I will probably use hist or density to do it and then look at

Re: [R] how to change automatically 0=no and 1=yes

2005-06-15 Thread Marc Schwartz
On Wed, 2005-06-15 at 15:58 +0200, Muhammad Subianto wrote: Dear R-helpers, I have dataset (data.frame) like below, x1 x2 x3 x4 x5 x6 x7 x8 x9 ... x1200 000110011 100110011 010110

[R] questions on bootstrap

2005-06-15 Thread Caterina Barillari
Hi, I would like to know: 1) if there is a way of getting an R-squared value for a bootstrap crossvalidation. 2) how I can get the total residual standard error for a bootstraped model. Thanks, Caterina __ R-help@stat.math.ethz.ch mailing list

[R] how to plot density distribution with a arrow pointer?

2005-06-15 Thread Hu Chen
Hi all, for example: X- rnorm(1000) X0 - 0.899 I want to draw a density distribution plot with a arrow pointer indicating the position of X0, meanwhile, giving out the p-value. any functions? Thanks very much. __ R-help@stat.math.ethz.ch mailing

[R] lme/gls heteroscedastic correlation structure

2005-06-15 Thread Steve Roberts
Greetings, We want to fit lme/gls models with a compound symmetry variance structure, but where the ICC takes different values across different groups of clusters. (Specifically a two arm clustrered trial with different ICC in each arm) Equivalent models can be fitted with heteroscedastic

[R] Getting the character set

2005-06-15 Thread Halldor Bjrnsson
Hi R-gurus, In python one can do import string print string.letters and get the characters in the local character set. This feature is often useful in Python, and if I could find it in R I could make good use of it. In R both Sys.getlocale() and localeToCharset() can tell me which charset

[R] Kalman Filtering?

2005-06-15 Thread Spencer Graves
1. The function KalmanLike seems to change its inputs AND PREVIOUSLY MADE copies of the inputs. Consider the following (using R 2.1.0 patched under Windows XP): Fig2.1 - StructTS(x=Nile, type=level) unlist(Fig2.1$model0[2:3]) a P 1120 286379470 tst2 -

Re: [R] how to plot density distribution with a arrow pointer?

2005-06-15 Thread Jim Brennan
This is one way not so good RX-rnorm(100) RX0-.899 Rplot(density(X)) Rabline(v=X0) A better way Rx-seq(-5,5,.01) Rplot(x,dnorm(x)) Rplot(x,dnorm(x),type=l,col=2) Rabline(v=X0,col=4) R?text Rtext(X0,.2,paste(P(XX0) =,signif(pnorm(X0),3)),pos=2) Rabline(v=X0,col=4) If you actually want arrows

[R] need help on computing double summation

2005-06-15 Thread Kerry Bush
Dear helpers in this forum, This is a clarified version of my previous questions in this forum. I really need your generous help on this issue. Suppose I have the following data set: id x y 023 1 2 023 2 5 023 4 6 023 5 7 412 2 5 412 3 4 412 4 6 412 7 9 220 5 7 220 4 8 220 9

[R] suppress output of neural network for use in Sweave

2005-06-15 Thread Thorstensen Nicolas
Hi! How can I suppress the output of the function nnet in the library(nnet) ? I get the following output : nn = nnet(x, y, size=5, maxit=40, linout=TRUE); # weights: 16 initial value 33.511291 iter 10 value 5.792440 iter 20 value 5.279584 iter 30 value 4.800890 iter 40 value 4.593410

Re: [R] how to change automatically 0=no and 1=yes

2005-06-15 Thread Muhammad Subianto
Dear all, Sean Davis, Dimitris Rizopoulos and Marc Schwartz, thanks for your great help. It works perfectly. Thanks a lot. All the best, Muhammad Subianto On this day 6/15/2005 4:06 PM, Sean Davis wrote: x - data.frame(matrix(c(1,0,1,0,1,1),nrow=3)) x[x==0] - 'no' x[x==1] - 'yes'

[R] a question about frame

2005-06-15 Thread ronggui
gg - function(y) { ggg - function() { cat(current frame is, sys.nframe(), \n) cat(parents are, sys.parents(), \n) print(sys.function(0)) # ggg print(sys.function(2)) # gg } if(y 0) gg(y-1) else ggg() } gg(3)

[R] random number generator: same seed used in different sessions

2005-06-15 Thread Jason Liao
I did several simulation sessions and the result turned out to be a surprise. After some investigation, I found that different R sessions of the program used the same seed. Simply, in R210, if I start R and type rnorm(1), I always get the same random number. This is contradictary to what is in the

Re: [R] Kalman Filtering?

2005-06-15 Thread Thomas Lumley
On Wed, 15 Jun 2005, Spencer Graves wrote: 1. The function KalmanLike seems to change its inputs AND PREVIOUSLY MADE copies of the inputs. The strange thing is that it changes its inputs. It would be expected that this also changed previously made copies. The copies will just be

Re: [R] suppress output of neural network for use in Sweave

2005-06-15 Thread Barry Rowlingson
Thorstensen Nicolas wrote: Hi! How can I suppress the output of the function nnet in the library(nnet) ? ?nnet suggests adding trace=FALSE to the arguments. In other cases if functions dont have this sort of option then on a Unix box you can wrap your function calls in sink(/dev/null)

Re: [R] random number generator: same seed used in different sessions

2005-06-15 Thread Prof Brian Ripley
On Wed, 15 Jun 2005, Jason Liao wrote: I did several simulation sessions and the result turned out to be a surprise. After some investigation, I found that different R sessions of the program used the same seed. Simply, in R210, if I start R and type rnorm(1), I always get the same random

Re: [R] umlauts in Rd files

2005-06-15 Thread Spencer Graves
Hi, Robin: Have you considered using moebius? In my elementary German class, I was taught that oe was an acceptable alternative to the umlaut. (This may not be relevant, but Google just gave me 788,000 hits for moebius and 750,000 for mobius.) Perhaps one of our German

Re: [R] Kalman Filtering?

2005-06-15 Thread Prof Brian Ripley
On Wed, 15 Jun 2005, Thomas Lumley wrote: On Wed, 15 Jun 2005, Spencer Graves wrote: 1. The function KalmanLike seems to change its inputs AND PREVIOUSLY MADE copies of the inputs. The strange thing is that it changes its inputs. It would be expected that this also changed

Re: [R] random number generator: same seed used in different sessions

2005-06-15 Thread Jason Liao
Thank you, Prof. Ripley. Yes, it turned out that different R sessions (batch mode) loaded the same work space. Inserting rm(list=ls(all=TRUE)) on top of the code solves the problem. --- Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 15 Jun 2005, Jason Liao wrote: I did several

Re: [R] Kalman Filtering?

2005-06-15 Thread Spencer Graves
Hi, Thomas: Thanks much. I modified the R code for KalmanLike as you suggested, and the problem went away. Next question: Should KalmanLike work the way it does without your suggested modification? If not, how do we get your proposal transmitted to the appropriate

Re: [R] umlauts in Rd files

2005-06-15 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes: UTF-8 for latex does not work well (as yet, at least: there is now a utf8 encoding that allows at least the first plane (Latin-1) to work). So it would be much better to use Latin-1 for the file and mark it with \encoding{latin1} and mark

[R] cannot coerce class matchit into a data.frame

2005-06-15 Thread Piccone, Jason E.
Greetings fellow humans, I am attempting to export a text file after using the MatchIt package to match control with treatment subjects. I attempted to write.table and used the following syntax: write.table(social,shaka.txt,sep= ,quote=FALSE,row.names=FALSE,col.names= FALSE) But received

Re: [R] suppress output of neural network for use in Sweave

2005-06-15 Thread Wensui Liu
could you set trace = FALSE in the nnet(). On 6/15/05, Thorstensen Nicolas [EMAIL PROTECTED] wrote: Hi! How can I suppress the output of the function nnet in the library(nnet) ? I get the following output : nn = nnet(x, y, size=5, maxit=40, linout=TRUE); # weights: 16 initial

Re: [R] questions on bootstrap

2005-06-15 Thread Frank E Harrell Jr
Caterina Barillari wrote: Hi, I would like to know: 1) if there is a way of getting an R-squared value for a bootstrap crossvalidation. 2) how I can get the total residual standard error for a bootstraped model. Thanks, Caterina Install the Design and Hmisc packages and look at

[R] abbreviate

2005-06-15 Thread Omar Lakkis
p = data.frame(high=c(5,2), settle=c(3,4)) p high settle 15 3 22 4 What is the most abbreviated way to apply: if (p$high p$settle) p$high = p$settle I want to modify p to become: p high settle 15 3 24 4 __

Re: [R] Kalman Filtering?

2005-06-15 Thread Prof Brian Ripley
On Wed, 15 Jun 2005, Spencer Graves wrote: Thanks much. I modified the R code for KalmanLike as you suggested, and the problem went away. Next question: Should KalmanLike work the way it does without your suggested modification? If not, how do we get your proposal

[R] Error using newdata argument in survfit

2005-06-15 Thread Hanke, Alex
Dear R-helpers, To get curves for a pseudo cohort other than the one centered at the mean of the covariates, I have been trying to use the newdata argument to survfit with no success. Here is my model statement, the newdata and the ensuing error. What am I doing wrong? summary(fit) Call:

Re: [R] abbreviate

2005-06-15 Thread Prof Brian Ripley
On Wed, 15 Jun 2005, Omar Lakkis wrote: p = data.frame(high=c(5,2), settle=c(3,4)) p high settle 15 3 22 4 What is the most abbreviated way to apply: if (p$high p$settle) p$high = p$settle I want to modify p to become: p high settle 15 3 24 4

Re: [R] abbreviate

2005-06-15 Thread Marc Schwartz
On Wed, 2005-06-15 at 13:59 -0400, Omar Lakkis wrote: p = data.frame(high=c(5,2), settle=c(3,4)) p high settle 15 3 22 4 What is the most abbreviated way to apply: if (p$high p$settle) p$high = p$settle I want to modify p to become: p high settle 15

[R] [OT] Re: umlauts in Rd files

2005-06-15 Thread Dirk Eddelbuettel
Spencer Graves spencer.graves at pdf.com writes: (This may not be relevant, but Google just gave me 788,000 hits for moebius and 750,000 for mobius.) Perhaps one of our German contributors could tell us which they prefer. As you asked for it: The former is correct, and the second is a

Re: [R] abbreviate

2005-06-15 Thread Marc Schwartz
On Wed, 2005-06-15 at 19:33 +0100, Prof Brian Ripley wrote: On Wed, 15 Jun 2005, Omar Lakkis wrote: p = data.frame(high=c(5,2), settle=c(3,4)) p high settle 15 3 22 4 What is the most abbreviated way to apply: if (p$high p$settle) p$high = p$settle I want

[R] Multiple line plots

2005-06-15 Thread Mihai Nica
Greetings, I would like to plot three lines on the same figure, and I am lost. There is an answer to a similar thread… but I tried matplot and it is beyond me. An example of the data follows: YearEM IM BM 19839.1 16.8-7.7 198412.018.0-6.0 198513.6

[R] Salford Systems Data Mining Conferences 2006

2005-06-15 Thread Lisa Solomon
Apologies for cross posting **Reserve the Dates** SALFORD SYSTEMS DATA MINING 2006 CONFERENCES San Diego, California: March 29 - March 31, 2006 Sydney, Australia: June 7 - June 8, 2006 The conference will offer prominent keynote speakers, including Jerome Friedman, coupled with informative

Re: [R] Multiple line plots

2005-06-15 Thread Ales Ziberna
assuming that your matrix is named x, try matplot(x,type=l) Ales Ziberna P.S.: see ?matplot for help to matplot. That it all it took me! - Original Message - From: Mihai Nica [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Wednesday, June 15, 2005 8:50 PM Subject: [R] Multiple

Re: [R] Chi square convolution?

2005-06-15 Thread Spencer Graves
Have you considered the distr package? Consider the following: library(distr) C1234 - Chisq(df=1, ncp=2)+Chisq(df=3, ncp=4) # = Chisq(df=1+3, ncp=2+4) q(C1234)(c(.025, .975)) [1] 1.823846 23.435932 qchisq(c(.025, .975), 4, 6) [1] 1.823846 23.435932 C12345 -

Re: [R] Multiple line plots

2005-06-15 Thread Marc Schwartz
On Wed, 2005-06-15 at 13:50 -0500, Mihai Nica wrote: Greetings, I would like to plot three lines on the same figure, and I am lost. There is an answer to a similar thread but I tried matplot and it is beyond me. An example of the data follows: Year EM IM BM 1983 9.1

Re: [R] Error using newdata argument in survfit

2005-06-15 Thread Prof Brian Ripley
You appear to have a coding for prior.f in newdata rather than the factor itself. It's a bit hard to be sure when we don't have data8 to compare with. On Wed, 15 Jun 2005, Hanke, Alex wrote: Dear R-helpers, To get curves for a pseudo cohort other than the one centered at the mean of the

Re: [R] [OT] Re: umlauts in Rd files

2005-06-15 Thread Prof Brian Ripley
As this is a proper name, is not what is `right' what the person concerned prefers (if known)? Guessing on their behalf is not unambiguous: even if you know someone is, say, German, their surname may not be or vice versa. People have even written to me to `correct' the spelling of `Box and

[R] ellipse -confidence interval

2005-06-15 Thread pgonzalez
Hi!, I made a plot with two variables representing the first two axis of a principle component analysis. My question is: How can I superimpose on such plot an ellipse that represent the 95% interval of confidence of scores? Best regards, Paula -- Lic. Paula Gonzalez División Antropología

Re: [R] Multiple line plots

2005-06-15 Thread Don MacQueen
Here is an example. It assumes the data is in a data frame, with all variables numeric. tst - data.frame(yr=1981:1990,y1=rnorm(10), y2=5+rnorm(10), y3=rnorm(10)-3) plot(tst$yr, tst$y1, ylim=range(tst[,-1]),type='l') lines(tst$yr,tst$y2,col=2) lines(tst$yr,tst$y3,col=3) -Don At 1:50 PM

Re: [R] need help on computing double summation

2005-06-15 Thread Huntsinger, Reid
You could do something like ids - unique(mydata$id) ans - vector(length=length(ids), mode=list) for (i in ids) { g - which(mydata$id == i) ans[[i]] - (length(g) - 1)*cov(mydata$x[g], mydata$y[g]) } ans but cov() returns NA for length 1 vectors, so you'd want an if (length(g) == 1) ans[i] - 0

[R] 2 LDA

2005-06-15 Thread Steve Adams
Hi, I am using Partek for LDA analysis. For a binary response variable, it generates 2 discriminant functions, one for each of the 2 levels of the response variable. And I can simply calculate 2 discriminant scores (say d1 and d2) for each sampples using the 2 discriminant functions, then I can

Re: [R] 2 LDA

2005-06-15 Thread Huntsinger, Reid
Note that p1 and p2 depend only on d1 - d2. Have a look at a book like Ripley's Pattern Recognition and Neural Networks or Anderson's multivariate statistics book for further information. Reid Huntsinger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

[R] coding to generate a matrix to prepare for chi-sqr test for text mining

2005-06-15 Thread Weiwei Shi
Hi, there: I have a dataset like the following: 1412|WINDOW|SHATTER|TORN|SOFT|TOP|WATER|RAIN|LAB|AI|BOLL|CAMP|0 1413|PARK|IV|STRUCK|PARK|PUSH|COD|POLICI|CIA|TB|SIC|0 2412|ACCID|REAREND|MULTI|EH|IV|MIDDL|FAN|DUAL|LOSS|CALM|1 2414|IV|REAREND|CD|COG|LAB|ADVERS|1

Re: [R] ellipse -confidence interval

2005-06-15 Thread Jari Oksanen
On 15 Jun 2005, at 23:05, [EMAIL PROTECTED] wrote: Hi!, I made a plot with two variables representing the first two axis of a principle component analysis. My question is: How can I superimpose on such plot an ellipse that represent the 95% interval of confidence of scores? You can't,

[R] k-fold cross validation with neural networks

2005-06-15 Thread Thorstensen Nicolas
Hi ! how can I do a k-fold crossvalidation with neural networks? and how can I load matlab data files into R? thx in advance! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] coding to generate a matrix to prepare for chi-sqr test f or text mining

2005-06-15 Thread Huntsinger, Reid
I would compile a table of all the words in the dataset (maybe you have it already), then create a list where each component is an integer vector of indices of words. That is, replace words by their positions in the table. From that sparse form you could create binary features to use with

Re: [R] coding to generate a matrix to prepare for chi-sqr test f or text mining

2005-06-15 Thread Huntsinger, Reid
The data structure I described is a sparse (binary) matrix, and I should have said you could use the SparseM or Matrix package's sparse matrix classes and methods to do what I suggested below. There are linear algebra routines available for them but for other things I'm not sure. Reid Huntsinger

Re: [R] abbreviate

2005-06-15 Thread Gabor Grothendieck
On 6/15/05, Marc Schwartz [EMAIL PROTECTED] wrote: On Wed, 2005-06-15 at 19:33 +0100, Prof Brian Ripley wrote: On Wed, 15 Jun 2005, Omar Lakkis wrote: p = data.frame(high=c(5,2), settle=c(3,4)) p high settle 15 3 22 4 What is the most abbreviated way to

Re: [R] Kalman Filtering?

2005-06-15 Thread Gabor Grothendieck
A simple workaround would be to call KalmanLike this way: KalmanLike(y, mod[], nit) as [] makes a copy. On 6/15/05, Spencer Graves [EMAIL PROTECTED] wrote: Hi, Thomas: Thanks much. I modified the R code for KalmanLike as you suggested, and the problem went away.

Re: [R] how to change automatically 0=no and 1=yes

2005-06-15 Thread Gabor Grothendieck
One thing to be careful of is that we likely intend to represent the columns of the data frame as factors in which case we still want the levels to be No and Yes even if a column only consists of one level (i.e. all No or all Yes). Note that one solution specifically provided for that. On

Re: [R] Finding local minima and maxima

2005-06-15 Thread Gabor Grothendieck
1. See ?turnpoints in package pastecs. 2. do it yourself with rapply in the zoo package: library(zoo) f - function(x) x[2] max(x[-2]) rapply(zoo(rank(x, ties = first)), 3, function(x) f(x) - f(-x)) Note that if a run is an extrema then the last member of a run of maxima and the

Re: [R] [OT] Re: umlauts in Rd files

2005-06-15 Thread Gabor Grothendieck
On 6/15/05, Dirk Eddelbuettel [EMAIL PROTECTED] wrote: Spencer Graves spencer.graves at pdf.com writes: (This may not be relevant, but Google just gave me 788,000 hits for moebius and 750,000 for mobius.) Perhaps one of our German contributors could tell us which they prefer. As you

Re: [R] suppress output of neural network for use in Sweave

2005-06-15 Thread Gabor Grothendieck
On 6/15/05, Barry Rowlingson [EMAIL PROTECTED] wrote: Thorstensen Nicolas wrote: Hi! How can I suppress the output of the function nnet in the library(nnet) ? ?nnet suggests adding trace=FALSE to the arguments. In other cases if functions dont have this sort of option then on a

Re: [R] ellipse -confidence interval

2005-06-15 Thread Douglas J. Trainor
I think Lic. Paula Gonzalez is after one ellipse representing Hotelling's T^2 with the major axis of the ellipse oriented along PC1 and minor axis oriented along PC2. douglas On Jun 15, 2005, at 5:27 PM, Jari Oksanen wrote: On 15 Jun 2005, at 23:05, [EMAIL PROTECTED] wrote: Hi!, I made

Re: [R] a question about frame

2005-06-15 Thread Gabor Grothendieck
On 6/15/05, ronggui [EMAIL PROTECTED] wrote: gg - function(y) { ggg - function() { cat(current frame is, sys.nframe(), \n) cat(parents are, sys.parents(), \n) print(sys.function(0)) # ggg print(sys.function(2)) # gg }

Re: [R] Multiple line plots

2005-06-15 Thread Gabor Grothendieck
On 6/15/05, Mihai Nica [EMAIL PROTECTED] wrote: Greetings, I would like to plot three lines on the same figure, and I am lost. There is an answer to a similar thread but I tried matplot and it is beyond me. An example of the data follows: YearEM IM BM 19839.1 16.8

Re: [R] Kalman Filtering?

2005-06-15 Thread Spencer Graves
Hi, Gabor: Great. Thanks. spencer graves Gabor Grothendieck wrote: A simple workaround would be to call KalmanLike this way: KalmanLike(y, mod[], nit) as [] makes a copy. On 6/15/05, Spencer Graves [EMAIL PROTECTED] wrote: Hi, Thomas: Thanks much. I modified the R code

[R] Vectorization

2005-06-15 Thread ManojW
Greetings, Can anyone suggest me if we can vectorize the following problem effectively? I have two datasets, one dataset is portfolio of stocks returns on a historical basis and another dataset consist of a bunch of factors (again on a historical basis). I intend to compute a rolling

Re: [R] how to plot density distribution with a arrow pointer?

2005-06-15 Thread Hu Chen
Thanks. A small arrow may be more nice-looking than a long cutting line. and, another question, how to get the p-value of the position of X0? If the whole distribution is not as regular as norm, chi-square but a strange one, how could I get the X0's p-value? any functions? Thanks very much. On

[R] how to use plot.lda included in MASS package?

2005-06-15 Thread wu sz
Hi there, I am a master student in Denmark, and apply R to analyze the drug data. I use the function 'lda' to obtain a linear discriminant object, and then wish to use 'plot.lda' to do the plot on this object like below. drug.lda - lda(Inhibition ~ NET_CHARGE + PKA_1 + MW + MLOGP,

  1   2   >