[R] R 1.9.0, special characters in variable names.

2004-06-23 Thread Sixten Borg
Hello all, I upgraded from R 1.8.1 to 1.9.0 (Windows XP), and spotted an odd thing. The last three letters in the Swedish alphabet are å, ä and ö. (In case they don't show correctly: they are a with a ring, a with two dots, and o with two dots (HTML: å ä ö). When I use these as variable names

Re: [R] Covered Labels

2004-06-23 Thread Prof Brian Ripley
On Thu, 24 Jun 2004, Jim Lemon wrote: > Martina Renninger wrote: > > Dear All! > > > > > > > > How can I cope with overlapping or covered labels (covered by labels > > from other data points) in plots? > > This doesn't solve every such problem, but it has helped me in the past. > You will probabl

Re: [R] Error message handling

2004-06-23 Thread Prof Brian Ripley
On Wed, 23 Jun 2004 [EMAIL PROTECTED] wrote: > Dear, R experts. > Does anybody have experience with 'optim' function? Yes. > I have an error message as the following. > > Error in optim(transcoefs, fn = hfdeviance, gr = hfdeviance.grad, method > = "BFGS", : > initial value in vmmin is not fini

Re: [R] assigning from multiple return values

2004-06-23 Thread Richard A. O'Keefe
Gabor Grothendieck <[EMAIL PROTECTED]> wrote: fn <- function(x,y) { assign(as.character(substitute(x)), "zz", sys.frame(-1)) assign(as.character(substitute(y)), 3, sys.frame(-1)) } fn(a,b) # sets a to "zz" and b to 3 "list2<-

Re: [R] Covered Labels

2004-06-23 Thread Jim Lemon
Martina Renninger wrote: > Dear All! > > > > How can I cope with overlapping or covered labels (covered by labels > from other data points) in plots? This doesn't solve every such problem, but it has helped me in the past. You will probably have to expand the xlim and ylim a bit to fit the extreme

[R] Can R handle twin peaks - normal distribution

2004-06-23 Thread Unung Istopo Hartanto
Hi R Users, Sorry if its out of topic. I would like to ask you about twin peaks - normal distribution. How R can handle it, any example to explain it in R. Thanks, regards, Unung __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman

Re: [R] Automatic routine - help

2004-06-23 Thread Richard A. O'Keefe
I note that ?min actually contains a relevant example: plot(x, pmin(cH, pmax(-cH, x)), type='b', main= "Huber's function") ^^ It's always worth timing things. The timing tests below are the best of several repetitions, to avoid worries about things like paging

Re: [R] assigning from multiple return values

2004-06-23 Thread Gabor Grothendieck
Just a few more examples: # swap a and b without explicitly creating a temporary a <- 1; b <- 2 list[a,b] <- list(b,a) # get eigenvectors and eigenvalues list[eval, evec] <- eigen(cbind(1,1:3,3:1)) # get today's month, day, year require(chron) list[Month, Day, Year] <- month.day.year(unclass(S

[R] truncated normal regression

2004-06-23 Thread B. Dan Wood
Does anyone have example code for a truncated normal regression using the survival package? Or any other package? Thanks. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gu

Re: [R] assigning from multiple return values

2004-06-23 Thread Gabor Grothendieck
I think I've found a workaround that avoids the two problems in the replacement function approach.With the definitions of list and [<-.result shown, one can write list[a,b] on the left side of an assignment where the right side of the assignment evaluates to a list of the same length (or if th

Re: [R] anova

2004-06-23 Thread Ulises Mora Alvarez
Hi! options(digits = 5) Good look. On Wed, 23 Jun 2004, fciclone wrote: > Could someone please tell me if it is a way to define > the number of decimals (for example 4 digits) in a > presentation of anova() results. I couldn't apply round > ()function. > > Thanks in advance. > Alex > > ___

[R] anova

2004-06-23 Thread fciclone
Could someone please tell me if it is a way to define the number of decimals (for example 4 digits) in a presentation of anova() results. I couldn't apply round ()function. Thanks in advance. Alex __ Acabe com aquelas jane

[R] nlme questions (e.g., specifying group membership, changing options)

2004-06-23 Thread [EMAIL PROTECTED]
I'm trying to better understand the nlme package and have a few questions. 1.) Other than using various coding strategies (e.g., dummy coding, effect coding), is there a way to identify group membership (i.e., treatment) directly? For example, the following code will fit a two group logist

Re: [R] A way to list only variables or functions?

2004-06-23 Thread Patrick Connolly
On Mon, 21-Jun-2004 at 03:50PM +0100, Barry Rowlingson wrote: |> Duncan Murdoch wrote: |> |> |> > I seem to recall that S-PLUS has such a function, but I forget the |> > name of it. Probably R does too, on CRAN if not in the base |> > packages. |> |> objects.summary() I think it was. |> |> I

Re: [R] Tick marks in xyplot

2004-06-23 Thread Deepayan Sarkar
Quoting Patrick Connolly <[EMAIL PROTECTED]>: > On Wed, 23-Jun-2004 at 07:32AM -0500, Deepayan Sarkar wrote: > > [...] > > |> 1. You can specify the limits, tick positions, and axis labels > |> individually for each panel (see documentation for 'scales' in ?xyplot; > |> all the relevant compon

[R] Error message handling

2004-06-23 Thread Kang . Changku
Dear, R experts. Does anybody have experience with 'optim' function? I have an error message as the following. Error in optim(transcoefs, fn = hfdeviance, gr = hfdeviance.grad, method = "BFGS", : initial value in vmmin is not finite I want to make a comment when this happen. Is there way I

Re: [R] assigning from multiple return values

2004-06-23 Thread Jack Tanner
Rolf Turner wrote: > fn <- function(x) { list(local_foo=foo, local_bar=bar) } OK, that works nicely. (And thanks to Paul Roebuck, who mentioned the values.list$foo notation.) (the ``return(...)'' is brought to you by your Department of Redundancy Department.) Aha! LISP reards its head. So

Re: [R] Tick marks in xyplot

2004-06-23 Thread Patrick Connolly
On Wed, 23-Jun-2004 at 07:32AM -0500, Deepayan Sarkar wrote: [...] |> 1. You can specify the limits, tick positions, and axis labels |> individually for each panel (see documentation for 'scales' in ?xyplot; |> all the relevant components - at, lab, etc - can be lists). How difficult would it

Re: [R] assigning from multiple return values

2004-06-23 Thread Peter Dalgaard
"Liaw, Andy" <[EMAIL PROTECTED]> writes: > My $0.02: > > If Jack feels that the fact that functions usually return a single list, and > one needs to access the components of the list separately, is somehow > hideous, then I'd rather suggest that R is perhaps the wrong language for > him. > > To

Re: [R] [Q] GET_DIM() crash on Windows only

2004-06-23 Thread Uwe Ligges
Paul Roebuck wrote: On Wed, 23 Jun 2004, Uwe Ligges wrote: Paul Roebuck wrote: I have the following contrived code in package format. On Solaris and Mac OS X, code runs just fine. On Windows, it crashes the R environment with the "Send Bug Report" dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP)

RE: [R] assigning from multiple return values

2004-06-23 Thread Liaw, Andy
My $0.02: If Jack feels that the fact that functions usually return a single list, and one needs to access the components of the list separately, is somehow hideous, then I'd rather suggest that R is perhaps the wrong language for him. To me the suggested `workarounds' are by far much more hideou

Re: [R] assigning from multiple return values

2004-06-23 Thread Gabor Grothendieck
Here are two approaches assuming foo is "zz" and bar is 3. FIRST You could pass the return variables in the argument list and then assign them in the caller's frame like this: fn <- function(x,y) { assign(as.character(substitute(x)), "zz", sys.frame(-1)) assign(as.character(subs

[R] Sphericity test

2004-06-23 Thread Eduardo Dutra de Armas
Hi R-users Does anybody know if there are functions or packages in R for sphericity tests like Bartlett's or Mauchly's? Thanks! __ Eng. Agr., M.Sc. Eduardo Dutra de Armas __ Centro de E

Re: [R] assigning from multiple return values

2004-06-23 Thread Paul Roebuck
On Wed, 23 Jun 2004, Jack Tanner wrote: > I know that if I have a function that returns multiple values, I should > do return(list(foo, bar)). But what do I do on the recieving end? > > fn <- function(x) { >return(list(foo, bar)) > } > > I know that at this point I could say > > values.list <-

[R] assigning from multiple return values

2004-06-23 Thread Jack Tanner
I know that if I have a function that returns multiple values, I should do return(list(foo, bar)). But what do I do on the recieving end? fn <- function(x) { return(list(foo, bar)) } I know that at this point I could say values.list <- fn(x) and then access values.list[1] values.list[2] But that'

RE: [R] Sorting elements in a data.frame

2004-06-23 Thread Dan Bolser
On Wed, 23 Jun 2004, Liaw, Andy wrote: >Do you mean: > >> pmax(x[,1], x[,2]) / pmin(x[,1], x[,2]) Magic! I needed a p! >Andy > >> From: Dan Bolser >> >> Hi, >> >> I have data like this >> >> print(x) >> >> ID VAL1VAL2 >> 12 6 >> 24 9 >> 345 12 >>

RE: [R] Sorting elements in a data.frame

2004-06-23 Thread Liaw, Andy
Do you mean: > pmax(x[,1], x[,2]) / pmin(x[,1], x[,2]) [1] 3.00 2.25 3.75 2.25 ?? Andy > From: Dan Bolser > > Hi, > > I have data like this > > print(x) > > IDVAL1VAL2 > 1 2 6 > 2 4 9 > 3 45 12 > 4 99 44 > > What I would like is data like t

[R] Sorting elements in a data.frame

2004-06-23 Thread Dan Bolser
Hi, I have data like this print(x) ID VAL1VAL2 1 2 6 2 4 9 3 45 12 4 99 44 What I would like is data like this... ID VAL1VAL2 1 2 6 2 4 9 3 12 45 4 44 99 So that my analysis of

Re: [R] converting apply output

2004-06-23 Thread Andrew Beckerman
Thanks eric... I figured this routine out as well. cvt<-function(dat){ x<-as.list(rep(0,dim(dat)[2])) for(i in 1:dim(dat)[2]){ x[[i]]<-dat[,i] x}} # get ragged array of 1's dat<-apply(mat,2,function(x) which(x==1)) # deal with this using cvt to creat list if(is.null(dim(dat))) dat2<-dat else dat2<-

Re: [R] Perl--R interface

2004-06-23 Thread Paul Roebuck
On Wed, 23 Jun 2004, XIAO LIU wrote: > My R is 1.8.1 in Linux. How can I call R in Perl process? > And call Perl from R? > This is only one direction but worth a look as an alternative. --

Re: [R] [Q] GET_DIM() crash on Windows only

2004-06-23 Thread Paul Roebuck
On Wed, 23 Jun 2004, Uwe Ligges wrote: > Paul Roebuck wrote: > > > I have the following contrived code in package format. > > On Solaris and Mac OS X, code runs just fine. On Windows, > > it crashes the R environment with the "Send Bug Report" > > dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP)

Re: [R] help with win.print

2004-06-23 Thread Uwe Ligges
Prof Brian Ripley wrote: Do remember that you need to double backslashes in R strings ... see the rw-FAQ. As I recall forward slashes work here too. On Wed, 23 Jun 2004, Joy, Tom wrote: I am trying to batch the printing of some graphs using win.print when I leave the printer option blank it pr

[R] Contour plots of PCA loadings

2004-06-23 Thread Laura Quinn
Hi, I was wondering if there is a way of plotting smoothed contours of PCA loadings onto a map. At the moment I have the loadings plotted as positive/negative (red/blue) scaled circles centred around where the physical stations are on a map - but I was wondering if there is a nicer way of plotting

Re: [R] help with win.print

2004-06-23 Thread Prof Brian Ripley
Do remember that you need to double backslashes in R strings ... see the rw-FAQ. As I recall forward slashes work here too. On Wed, 23 Jun 2004, Joy, Tom wrote: > I am trying to batch the printing of some graphs using win.print when I leave the > printer option blank it prompts me for a printe

[R] help with win.print

2004-06-23 Thread Joy, Tom
I am trying to batch the printing of some graphs using win.print when I leave the printer option blank it prompts me for a printer each time and then works fine when I put the printer name in however using the following code I get the error below. Does the printer need to be locally installed or

Re: [R] Fitting function with if-clause (nls; e.g. heaviside)

2004-06-23 Thread Prof Brian Ripley
On Wed, 23 Jun 2004, Karl Knoblick wrote: > I want to fit a function. The function is e.g.: > y = c+m1*x if x<0, c+m2*x if x>=0 > where m1, m2 and c is a parameter and x, y are > variables of a data frame. > > I think using nls is appropriate. But I do not know, > how to type this formula in nls

RE: [R] Perl--R interface

2004-06-23 Thread Arne.Muller
Hi, look at http://www.omegahat.org/RSPerl/index.html. regards, Arne -- Arne Muller, Ph.D. Toxicogenomics, Aventis Pharma arne dot muller domain=aventis com > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of XIAO LIU > Sent: 23

Re: [R] Automatic routine - help

2004-06-23 Thread Gabor Grothendieck
You already have a few solutions but here is one more: (z >= 0 & z <= 1) * z + (z > 1) It uses the fact that TRUE and FALSE act as 1 and 0 in arithmetic. Slightly shorter but trickier is: (z*z <= z) * z + (z > 1) which uses the fact that z*z <= z only in the interval [0,1] . Monica Pal

[R] Fitting function with if-clause (nls; e.g. heaviside)

2004-06-23 Thread Karl Knoblick
Hallo! I want to fit a function. The function is e.g.: y = c+m1*x if x<0, c+m2*x if x>=0 where m1, m2 and c is a parameter and x, y are variables of a data frame. I think using nls is appropriate. But I do not know, how to type this formula in nls. Can anybody help? (If there is a possibility t

[R] Problem with XML package compilation on AIX

2004-06-23 Thread Marea Bissonnette
Hi, I hope someone has seen this problem before. I am trying to install the XML package from http://cran.r-project.org/src/contrib/XML_0.95-6.tar.gz. Using > R CMD INSTALL XML_0.95-6.tar.gz I get the following error message: /usr/vac/bin/xlc_r -I/usr/local/lib/R/include -DLIBXML -I/opt/free

[R] Perl--R interface

2004-06-23 Thread XIAO LIU
R users: My R is 1.8.1 in Linux. How can I call R in Perl process? And call Perl from R? Thanks Xiao __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/po

Re: [R] gui for MacOS X / Aqua

2004-06-23 Thread Ulises Mora Alvarez
Hello, Yes, indeed. All you have to do it's: launch your X server (take a look at your /Applications/Utilities folder), and then launch R from an xterm. If you don't have your X server installed, take a look at the RAqua-FAQ and the R-FAQ on CRAN. If you need more help, please don't hesitate i

RE: [R] R 1.9.1 compilation error (on AIX 5.1)

2004-06-23 Thread Liaw, Andy
> From: Prof Brian Ripley > > We do have alpha/beta test periods for new releases of R, so > would anyone > who did test AIX please confirm that they did succeed. (No > one reported > an error, including yourself: are any AIX users interested in helping > having R available for AIX?) It is

[R] grid lines when plotting its object

2004-06-23 Thread M. Sutter
Dear R community When plotting an its object (with 'plot(..)), grid lines are automatically added which I cannot control with parameter 'tck/tcl'. Furthermore the vertical grid lines (time axis) do not comply with the automatically generated tickmark locations. Can somebody tell me how to handle

Re: [R] Covered Labels

2004-06-23 Thread Marc Schwartz
On Wed, 2004-06-23 at 09:06, Martina Renninger wrote: > Dear All! > How can I cope with overlapping or covered labels (covered by labels > from other data points) in plots? Presuming that you are using text() to identify points in a plot, you can use the 'cex' argument (which defaults to 1) to r

[R] Covered Labels

2004-06-23 Thread Martina Renninger
Dear All! How can I cope with overlapping or covered labels (covered by labels from other data points) in plots? Martina Renninger [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.

Re: [R] Automatic routine - NEW

2004-06-23 Thread Adaikalavan Ramasamy
On Wed, 2004-06-23 at 13:53, Monica Palaseanu-Lovejoy wrote: > Hi Again, > > First of all thank you for all the responses to my previous query. > Your answers were very helpful and I did the job ;-). Now I hope you > can answer as quick the following (sorry I am invading you with > trivial ques

Re: [R] Automatic routine - NEW

2004-06-23 Thread Monica Palaseanu-Lovejoy
Hi Spencer, Your answer is very helpful. I was wondering if i should write again to the list to ask where i suppose to read about indices and things liek that since it seems they are very useful in lots of things. But you already gave me the answer. Thanks again, Monica

Re: [R] Automatic routine - NEW

2004-06-23 Thread Spencer Graves
The documentation is good for things like this. In most (all recent?) versions of R, "help.start()" brings up a help page. Select "An Introduction to R", and go to "Vector Indices". Also look at "Arrays and Matrices: Array Indexing". There, you will find that "DF[3:5,]" might be what you want.

Re: [R] legend

2004-06-23 Thread Jim Lemon
Perez Martin, Agustin wrote: > DeaR UseRs: > > I want to put a legend in my plot. In the first line of the legend I want > to put a box filled but in the second one I would like to put a lty=2 > > Of course it must appear with different colors. > I think I wrote this function about a year ago for s

RE: [R] Automatic routine - NEW

2004-06-23 Thread Liaw, Andy
Sounds to me that you are looking for something like: subDF <- DF[3:5,] Andy > From: Monica Palaseanu-Lovejoy > > Hi Again, > > First of all thank you for all the responses to my previous query. > Your answers were very helpful and I did the job ;-). Now I hope you > can answer as quick the

Re: [R] [Q] GET_DIM() crash on Windows only

2004-06-23 Thread Sundar Dorai-Raj
Uwe Ligges wrote: Paul Roebuck wrote: I have the following contrived code in package format. On Solaris and Mac OS X, code runs just fine. On Windows, it crashes the R environment with the "Send Bug Report" dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries with the same result. PCs otherwi

Re: [R] [Q] GET_DIM() crash on Windows only

2004-06-23 Thread Sundar Dorai-Raj
Uwe Ligges wrote: Paul Roebuck wrote: I have the following contrived code in package format. On Solaris and Mac OS X, code runs just fine. On Windows, it crashes the R environment with the "Send Bug Report" dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries with the same result. PCs otherwi

RE: [R] Sciviews

2004-06-23 Thread Philippe Grosjean
Ronaldo Reis Jr wrote: >Anybody use Sciviews with Linux or MacOS X? It work with these systems? Not yet... but we are rewritting a part of the code so that some features become platform-independent. Please, leave us a little time to archive this. There are tens of thousands of lines of code in Sci

[R] Automatic routine - NEW

2004-06-23 Thread Monica Palaseanu-Lovejoy
Hi Again, First of all thank you for all the responses to my previous query. Your answers were very helpful and I did the job ;-). Now I hope you can answer as quick the following (sorry I am invading you with trivial questions): Let’s use again the following data.frame example: DF <- data.fra

Re: [R] Tick marks in xyplot

2004-06-23 Thread Deepayan Sarkar
On Wednesday 23 June 2004 06:36, Ingolfsson, Olafur wrote: > Dear R group > > I am making multiple xyplot, and would like to have tick marks on > bottom and left in EACH panel, but only tick labels at the bottom and > left of the whole graph. I have browsed the internet, as well as the > help page

[R] Sciviews

2004-06-23 Thread Ronaldo Reis Jr.
Anybody use Sciviews with Linux or MacOS X? It work with these systems? Thanks Ronaldo -- A hacker does for love what others would not do for money. -- |> // | \\ [***] | ( õ õ ) [Ronaldo Reis Júnior] |> V [UFV/DBA-Entomologia

Re: [R] Grouped AND stacked bar charts possible in R?

2004-06-23 Thread Ivailo Partchev
This may have been answered before, but a nice possibility to plot the Titanic data is offered by "mosaic plots", as introduced (I think) by John Hartigan and implemented in the VCD package Ivailo Partchev Jena Marc Schwartz wrote: On Tue, 2004-06-22 at 10:54, Patrick Lenon wrote: Good day al

[R] gui for MacOS X / Aqua

2004-06-23 Thread Ronaldo Reis Jr.
Hi, anybody know if Rcmdr or any other GUI like this work with R/Aqua? Thanks Ronaldo -- Let's organize this thing and take all the fun out of it. -- |> // | \\ [***] | ( õ õ ) [Ronaldo Reis Júnior] |> V [UFV/DBA-Entomologia

Re: [R] converting apply output

2004-06-23 Thread Eric Lecoutre
Hi, Why not try with the data.frame structure, wich internally yet consists in a list: > lapply(as.data.frame(m1),function(x) which(x==1)) $V1 [1] 8 9 $V2 [1] 9 10 [...] Eric At 12:53 23/06/2004, Andrew Beckerman wrote: Hi - platform powerpc-apple-darwin6.8 status major1 minor9.0 year

[R] Tick marks in xyplot

2004-06-23 Thread Ingolfsson, Olafur
Dear R group I am making multiple xyplot, and would like to have tick marks on bottom and left in EACH panel, but only tick labels at the bottom and left of the whole graph. I have browsed the internet, as well as the help page without success. If anyone could help me find the path to the solutio

Re: [R] ts & daily timeseries

2004-06-23 Thread Vittorio
On Tuesday 22 June 2004 17:41, Prof Brian Ripley wrote: > data.frame(time=mytime, ts=myts) > > would appear to be what you are looking for. > > On Tue, 22 Jun 2004 [EMAIL PROTECTED] wrote: > > I have defined a daily timeseries for the 365 days of 2003 issuing: > > > > myts = ts(dati[,2:10],frequenc

[R] converting apply output

2004-06-23 Thread Andrew Beckerman
Hi - platform powerpc-apple-darwin6.8 status major1 minor9.0 year 2004 I am trying to deal with the output of apply(). As indicated, when each call to 'FUN' returns a vector of length 'n', then 'apply' returns an array of dimension 'c(n, dim(X)[MARGIN])'. However, I would like thi

Re: [R] How to define stopping criterium for Optim with L-BFGS-B

2004-06-23 Thread Prof Brian Ripley
On Wed, 23 Jun 2004, ZABALZA-MEZGHANI Isabelle wrote: > I am using optim with a L-BFGS-B method to minimize a function. As I've > understood, the way to specify a tolerance for stopping optimization is > through "factr" argument. > My function, is by construction, minimal when equal to 1. I wonder

Re: [R] Automatic routine - help

2004-06-23 Thread Prof Brian Ripley
On Wed, 23 Jun 2004, Barry Rowlingson wrote: > Uwe Ligges wrote: > > Monica Palaseanu-Lovejoy wrote: > > > >> Hi, > >> > >> I would like to write a little automatic routine in R, but i am a too > >> much of a beginner for that. I will appreciate any help regarding this > >> particular problem.

Re: [R] Automatic routine - help

2004-06-23 Thread Barry Rowlingson
Uwe Ligges wrote: Monica Palaseanu-Lovejoy wrote: Hi, I would like to write a little automatic routine in R, but i am a too much of a beginner for that. I will appreciate any help regarding this particular problem. If all columns of your data.frame are numeric: z[z<0] <- 0 z[z>1] <- 1 For added

[R] How to define stopping criterium for Optim with L-BFGS-B

2004-06-23 Thread ZABALZA-MEZGHANI Isabelle
Hi, I am using optim with a L-BFGS-B method to minimize a function. As I've understood, the way to specify a tolerance for stopping optimization is through "factr" argument. My function, is by construction, minimal when equal to 1. I wonder if there is any way to pass this info to "optim". If not,

RE: [R] Automatic routine - help

2004-06-23 Thread Monica Palaseanu-Lovejoy
Hi, This works beautifully as well. Thanks, Monica __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

RE: [R] Automatic routine - help

2004-06-23 Thread BXC (Bendix Carstensen)
for (j in 1:n) df[,j] <- pmin( pmax( df[,j], 0 ), 1 ) should do the job. Bendix Carstensen -- Bendix Carstensen Senior Statistician Steno Diabetes Center Niels Steensens Vej 2 DK-2820 Gentofte Denmark tel: +45 44 43 87 38 mob: +45 30 75 87 38 fax: +45 44 43 07 06 [EMAIL PROTE

Re: [R] Automatic routine - help. THANKS!

2004-06-23 Thread Monica Palaseanu-Lovejoy
Hi, Thank you so much for the little example - this was exactly what i was looking for. Just i didn't know what to search after in R. I will change it for my data needs. Thanks again, Monica __ [EMAIL PROTECTED] mailing list https://www.stat.math.et

Re: [R] legend

2004-06-23 Thread Ko-Kang Kevin Wang
Hi, - Original Message - From: "Perez Martin, Agustin" <[EMAIL PROTECTED]> To: "lista R help (E-mail)" <[EMAIL PROTECTED]> Sent: Wednesday, June 23, 2004 9:19 PM Subject: [R] legend > DeaR UseRs: > > I want to put a legend in my plot. In the first line of the legend I want to > put a bo

[R] Colored label on dendrogram

2004-06-23 Thread Philippe Hupé
Hi, Can someone tell me how to put labels of differente colors on a tree dendrogram. Thanks -- Philippe Hupé UMR 144 - Service Bioinformatique Institut Curie Laboratoire de Transfert (4ème étage) 26 rue d'Ulm 75005 Paris - France Email : [EMAIL PROTECTED] Tél :+33 (0)1 44 32 42 75 F

[R] legend

2004-06-23 Thread Perez Martin, Agustin
DeaR UseRs: I want to put a legend in my plot. In the first line of the legend I want to put a box filled but in the second one I would like to put a lty=2 Of course it must appear with different colors. Thanks. __ [EMAIL PROTECTED] mailing list https

Re: [R] Automatic routine - help

2004-06-23 Thread Prof Brian Ripley
How about newDF <- DF newDF[] <- lapply(DF, function(x) pmax(0, pmin(x, 1))) as in > DF <- data.frame(x=rnorm(5), y=rnorm(5)) > newDF <- DF > newDF[] <- lapply(DF, function(x) pmax(0, pmin(x, 1))) > newDF x y 1 0.31872426 1.000 2 1. 0.000 3 1. 0.4510969

Re: [R] Automatic routine - help

2004-06-23 Thread Uwe Ligges
Monica Palaseanu-Lovejoy wrote: Hi, I would like to write a little automatic routine in R, but i am a too much of a beginner for that. I will appreciate any help regarding this particular problem. Let’s suppose I have a data.frame with j columns (from 1 to n) and i rows (from 1 to p). I would l

Re: [R] R 1.9.1 compilation error (on AIX 5.1)

2004-06-23 Thread Prof Brian Ripley
We do have alpha/beta test periods for new releases of R, so would anyone who did test AIX please confirm that they did succeed. (No one reported an error, including yourself: are any AIX users interested in helping having R available for AIX?) It is much better to have such reports during a

[R] Automatic routine - help

2004-06-23 Thread Monica Palaseanu-Lovejoy
Hi, I would like to write a little automatic routine in R, but i am a too much of a beginner for that. I will appreciate any help regarding this particular problem. Let’s suppose I have a data.frame with j columns (from 1 to n) and i rows (from 1 to p). I would like to write a procedure which

Re: [R] GARCH and forecasting

2004-06-23 Thread Adrian Trapletti
Laura Holt wrote: Dear R People: Is there a way to forecast with GARCH modeling as found in tseries, please? When I use the predict command, I get an output of length 100, regardless of what I put in the n.ahead steps. n.ahead is no argument to predict.garch. See ?predict.garch. Only one-step a

[R] R 1.9.1 compilation error

2004-06-23 Thread Frankie Cheung
Dear Sir/Madam, I encounter some problem duuring compilation of R 1.9.1 on AIX 5.1, after running "./configure" then I type "make" to compile: # make . gcc -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I. -I../../src/include -I../../src/include -I/usr/local/include -D

[R] GARCH and forecasting

2004-06-23 Thread Laura Holt
Dear R People: Is there a way to forecast with GARCH modeling as found in tseries, please? When I use the predict command, I get an output of length 100, regardless of what I put in the n.ahead steps. R Version 1.9.0 Thanks in advance. Sincerely, Laura mailto: [EMAIL PROTECTED] download! http://t

[R] chronological clustering

2004-06-23 Thread Angel Lopez
Does anybody know of any R functions to perform chronological clustering as explained in: Legendre, P., S. Dallot & L. Legendre. 1985. Succession of species within a community: chronological clustering, with applications to marine and freshwater zooplankton. American Naturalist 125: 257-288. h

Re: [R] [Q] GET_DIM() crash on Windows only

2004-06-23 Thread Uwe Ligges
Paul Roebuck wrote: I have the following contrived code in package format. On Solaris and Mac OS X, code runs just fine. On Windows, it crashes the R environment with the "Send Bug Report" dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries with the same result. PCs otherwise appear properly