[R] Legend text -- discrepancy between X11 and postscript

2004-01-15 Thread Itay Furman
Hi, When I place a legend on a plot it looks exactly as I intended on the screen. However, almost always, when I export this to postscript file, the legend's text protrudes through the legend's frame (the latter being placed correctly). See the appended example code. I can send the EPS file as

Re: [R] Using pam, agnes or clara as prediction models?

2004-01-15 Thread Renald Buter
On Wed, Jan 14, 2004 at 03:18:10PM -0500, Liaw, Andy wrote: If pam produces the cluster medoids, you should be able to use the 1-nearest-neighbor classifier for prediction of future data, using the medoids as the `training' data. 1-NN is available in the `class' package, part of the `VR'

Re: [R] Legend text -- discrepancy between X11 and postscript

2004-01-15 Thread Philipp Pagel
Hi! On Wed, Jan 14, 2004 at 11:08:44PM -0800, Itay Furman wrote: When I place a legend on a plot it looks exactly as I intended on the screen. However, almost always, when I export this to postscript file, the legend's text protrudes through the legend's frame (the latter being

Re: [R] univariant time series

2004-01-15 Thread Martin Maechler
Samuel == Samuel Kemp (Comp) [EMAIL PROTECTED] on Wed, 14 Jan 2004 13:53:10 + writes: Samuel Hi, I am trying to use the stl function in the ts Samuel package. It requires that the data is a univariant Samuel time series at the moment my data is in a vector. I Samuel have

Re: [R] Binomial glms with very small numbers

2004-01-15 Thread Prof Brian Ripley
On Wed, 14 Jan 2004, Spencer Graves wrote: Yes, but glm maximizes the binomial likelihood assuming log(p/(1-p)) is a linear model. Therefore, you don't have to transform the 0's and 1's. There are cases where a particular combination of potential explanatory variables will clearly

Re: [R] Legend text -- discrepancy between X11 and postscript

2004-01-15 Thread Prof Brian Ripley
The short answer is not to copy the device, but to replot on the new device. That is the advice given in MASS, for example. When you copy a device, you replay the device list and hence the lines and text are placed at the positions calculated using the font metrics of the first device and not

Re: [R] R equivalent of Splus peaks() function?

2004-01-15 Thread Petr Pikal
Hi #- # funkce pro automaticke oznaceni piku ve spektru (peaks) # autor Brian Ripley # span has to be odd number peaks-function(series,span=3) { z - embed(series, span) s - span%/%2 v- max.col(z) == 1 + s result -

Re: [R] Using pam, agnes or clara as prediction models?

2004-01-15 Thread Renald Buter
On Thu, Jan 15, 2004 at 08:32:45AM +, Prof Brian Ripley wrote: On Thu, 15 Jan 2004, Renald Buter wrote: On Wed, Jan 14, 2004 at 03:18:10PM -0500, Liaw, Andy wrote: If pam produces the cluster medoids, you should be able to use the 1-nearest-neighbor classifier for prediction of

Re: [R] R internal data types

2004-01-15 Thread Martin Maechler
Benjamin == Benjamin STABLER [EMAIL PROTECTED] on Wed, 14 Jan 2004 15:52:46 -0800 writes: Benjamin So it looks like R stores numbers as doubles Benjamin unless the are converted to integers (long) with Benjamin the as.integer() function or they are created

Re: [R] R internal data types

2004-01-15 Thread Prof Brian Ripley
On Wed, 14 Jan 2004 [EMAIL PROTECTED] wrote: I am trying to figure out R data types and/or storage mode. For example: [...] So it looks like R stores numbers as doubles unless the are converted to integers (long) with the as.integer() function or they are created with the : operator. If

Re: [R] Using pam, agnes or clara as prediction models?

2004-01-15 Thread Prof Brian Ripley
On Thu, 15 Jan 2004, Renald Buter wrote: On Thu, Jan 15, 2004 at 08:32:45AM +, Prof Brian Ripley wrote: On Thu, 15 Jan 2004, Renald Buter wrote: On Wed, Jan 14, 2004 at 03:18:10PM -0500, Liaw, Andy wrote: If pam produces the cluster medoids, you should be able to use the

Re: [R] How can I test if a not independently and not identically distributed time series residuals' are uncorrelated ?

2004-01-15 Thread Adrian Trapletti
I'm analizing the Argentina stock market (merv) I download the data from yahoo library(tseries) Argentina - get.hist.quote(instrument=^MERV,1996-10-08,2003-11-03, quote=Close) merv - na.remove(log(Argentina)) I made the Augmented Dickey-Fuller test to analyse if merv have unit root:

[R] model II regression

2004-01-15 Thread eesteves
Dear All, A friend asked me for help with a regression problem dealing with y and x, both random variables. The x and y are respectively the observed and estimated biomass values of a green algae derived from an ecological model. We first considered it to be a model II regression and

Re: [R] Using pam, agnes or clara as prediction models?

2004-01-15 Thread Renald Buter
On Thu, Jan 15, 2004 at 08:59:37AM +, Prof Brian Ripley wrote: [snip] # separate the ruspini data into train and test set train-ruspini[1:50,] test-ruspini[51:75,] pamx-pam(train,4) knnx-knn(pamx$medoids,test,factor(c(a,b,c,d)),k=3) knnx [1] d d b b d c

Re: [R] How can I test if time series residuals' are uncorrelated ?

2004-01-15 Thread Adrian Trapletti
Ok I made Jarque-Bera test to the residuals (merv.reg$residual) library(tseries) jarque.bera.test(merv.reg$residual) X-squared = 1772.369, df = 2, p-value = 2.2e-16 And I reject the null hypotesis (H0: merv.reg$residual are normally distributed) So I know that: 1 - merv.reg$residual aren't

[R] Exactness of ppois

2004-01-15 Thread Matthias Kohl
Hello, by checking the precision of a convolution algorithm, we found the following inexactness: We work with R Version 1.8.1 (2003-11-21) on Windows systems (NT, 2000, XP). Try the code: ## Kolmogorov distance between two methods to ## determine P(Poisson(lambda)=x) Kolm.dist - function(lam,

[R] Sjava question on MacOS 10.3

2004-01-15 Thread Sean Davis
I am running R-1.81, apple's JVM installed with OS 10.3.2, and installed Sjava-0.65.X (a patched version of Sjava for MacOS from Simon Urbanek, which I know is inherently dangerous, but...). This version installed fine and some aspects seem to work as expected. However, this is one of the

[R] A language technical question.

2004-01-15 Thread Johan Lindberg
If I have 100 objekts in a folder and I prefer not to load them manually I wonder how I do this in R if using a for-loop. I was thinking initially to do something like this: infiles - dir(pattern=.RData) for(i in length(infiles)) { load(infiles[i]) paste(kalle, i, sep=)

Re: [R] A language technical question.

2004-01-15 Thread Uwe Ligges
Johan Lindberg wrote: If I have 100 objekts in a folder and I prefer not to load them manually I wonder how I do this in R if using a for-loop. I was thinking initially to do something like this: infiles - dir(pattern=.RData) For sure you mean infiles - dir(pattern = \\.RData) for(i in

[R] nlme vs aov with Error() for an ANCOVA

2004-01-15 Thread Christoph Lehmann
Hi I compouted a multiple linear regression with repeated measures on one explanatory variable: BOLD peak (blood oxygenation) as dependent variable, and as independent variables I have: -age.group (binaray:young(0)/old(1)) -and task-difficulty measured by means of the reaction-time 'rt'. For

Re: [R] A language technical question.

2004-01-15 Thread Prof Brian Ripley
You have two problems. 1) You want to use assign(paste(kalle, i, sep=), saveLoadReference) to create the name. That one is discussed frequently enough to be an FAQ, and it is Q7.23. 2) You need to keep the return value of load to assign to the object. So I think you want for(i in

Re: [R] nlme vs aov with Error() for an ANCOVA

2004-01-15 Thread Prof Brian Ripley
Well, I don't think this is ANCOVA as you seem to want to specify a random slope for a covariate. aov() is not designed for that. It is also not designed for assessing the size of fixed effects which seems the question here. As I understand it, you have only one observation for each value of

Re: [R] Using pam, agnes or clara as prediction models?

2004-01-15 Thread Martin Maechler
Renald == Renald Buter [EMAIL PROTECTED] on Thu, 15 Jan 2004 12:22:18 +0100 writes: Renald Thank you *very* much for your help. I thought I'd let the list know Renald what I did to get it right: # create a seed vector seed-rank(runif(75)) S has a function for

[R] Resend: help with Hmisc/ Design installation in R-aqua (apple).

2004-01-15 Thread Bema Bonsu
Hello again. This is a resend (first sent on the 12th of January); I would truly appreciate a response. I have tried, unsuccessfully, to install the Hmisc and Design libraries (Harrell FE Jr) in R-aqua (Apple). These libraries are in source code only (i.e. not yet in ready-to-use binary

Re: [R] Resend: help with Hmisc/ Design installation in R-aqua (apple).

2004-01-15 Thread Thomas Lumley
On Thu, 15 Jan 2004, Bema Bonsu wrote: Hello again. This is a resend (first sent on the 12th of January); I would truly appreciate a response. I have tried, unsuccessfully, to install the Hmisc and Design libraries (Harrell FE Jr) in R-aqua (Apple). These libraries are in source code only

Re: [R] Ordering bars in barplots

2004-01-15 Thread Prof Brian Ripley
by() will sort on the levels of `class', so I think what you need to do is ensure that `class' has its levels sorted numerically. Try df$class - factor(as.numeric(as.character(df$class))) to do that. Then to sort the df by numerical class you could use df - df[sort.list(unclass(df$class)), ]

[R] Ordering bars in barplots

2004-01-15 Thread Scott Norton
I have a dataframe such that when I enter the dataframe name at the R prompt and see the data, the order of the data is correct (ie. what I want - ordered numerically by the factor, class). The table is akin to the following: df: (dataframe = df) uniqueID class age a 132 b

[R] empty string

2004-01-15 Thread Wolski
Hi! How to generate a empty string of a precise length without using a loop? I need a empty string (char **) to pass it with .C function to a c dll. The c routine writes the result into the string. Eryk. Dipl. bio-chem. Eryk Witold Wolski@MPI-MG Dep. Vertebrate Genomics

Re: [R] empty string

2004-01-15 Thread Thomas Lumley
On Thu, 15 Jan 2004, Wolski wrote: Hi! How to generate a empty string of a precise length without using a loop? paste(rep( ,n), collapse=) gives a string of n spaces. -thomas I need a empty string (char **) to pass it with .C function to a c dll. The c routine writes the

Re: RE: [R] Generalized least squares using gnls function

2004-01-15 Thread Ravi Varadhan
Dear Christian: That is not the problem, but thanks for your attempted help. I still don't know what the problem is. Has anyone encountered this while using gnls function in the package nlme? thanks again for any help, Ravi. - Original Message - From: Christian Mora [EMAIL

Re: [R] empty string

2004-01-15 Thread Barry Rowlingson
Thomas Lumley wrote: paste(rep( ,n), collapse=) gives a string of n spaces. Is that more or less efficient/faster or slower than using sprintf: sprintf(paste(%,n,s,sep=''), ) A quick test shows it to take about two-thirds the CPU time of the paste(rep()) solution. Not that it matters - I

Re: RE: [R] Generalized least squares using gnls function

2004-01-15 Thread Ravi Varadhan
Hi: I tried Prof. Ripley's suggestion and I got the following error message: ans52g - gnls(log(b52) ~ p0 + p1/(1 + exp(-(log(dose)-p2)/p3))^p4, start=list(p0=3,p1=8,p2=2,p3=2,p4=1.5),control=gnlsControl(tol=1.e-07), weights=varPower(form=~fitted(.))) Error in varPower(form = ~fitted(.)) : form

[R] old version of R for Windows

2004-01-15 Thread Man, Michael
I am looking for old version of R for Windows (before 1.5). Where would I find them? Michael LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}} __ [EMAIL PROTECTED] mailing list

RE: [R] how to overlap plots

2004-01-15 Thread RBaskin
Can you help me to overlap a histogram and theoretical density curve of poison distribution? There is more than one Poisson distribution you could possibly overlap but a common choice is the Poisson with parameter = observed mean of the data - in your case, 0.7. I think the below is somewhat

Re: [R] how to overlap plots

2004-01-15 Thread Jim Lindsey
Dear R experts: Can you help me to overlap a histogram and theoretical density curve of poison distribution? for example data like this: The numbers of sanils found in each of 100 sampling quadrats in an area were as follows: number of snails, r 0 1 2 3 4 5 8 15 f=frequency of r 69

[R] Extracting multiple elements from a list

2004-01-15 Thread Waichler, Scott R
For a long time I've wanted a way to conveniently extract multiple elements from a list, which [[ doesn't allow. Can anyone suggest an efficient function to do this? Wouldn't it be a sensible addition to R? For example, alist - list() alist[[1]] - list() alist[[1]]$name - first alist[[1]]$vec

Re: [R] old version of R for Windows

2004-01-15 Thread Prof Brian Ripley
The sources are on CRAN still, and older compilers (if needed) are available via www.mingw.org. So where is the difficulty? On Thu, 15 Jan 2004, Man, Michael wrote: I am looking for old version of R for Windows (before 1.5). Where would I find them? -- Brian D. Ripley,

RE: [R] Extracting multiple elements from a list

2004-01-15 Thread Liaw, Andy
Aren't sapply()/lapply() sufficient for this? sapply(alist, function(x) x$vec) [,1] [,2] [1,]15 [2,]26 [3,]37 [4,]48 lapply(alist, function(x) x$vec) [[1]] [1] 1 2 3 4 [[2]] [1] 5 6 7 8 HTH, Andy From: Waichler, Scott R For a long time I've wanted a

[R] Lattices: Cloud: Background

2004-01-15 Thread Mueller, Adrienne
Hi, There's probably some simple way of doing this, but I'm just not seeing it - How do I get the background to be white instead of grey when I have a cloud plot (using the lattices package)? par(bg=white) isn't working. I'm assuming par commands won't work on lattice plots. What should I use

[R] hyperlink in the R logo to a/the R homepage?

2004-01-15 Thread Jeff D. Hamann
Would it be smart to add a hyperlink for the R logo (in the help files) that would go the, or a, R homepage? --- Jeff D. Hamann Forest Informatics, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 (office) 541-754-1428 (cell) 541-740-5988 [EMAIL PROTECTED] www.forestinformatics.com

RE: [R] Extracting multiple elements from a list

2004-01-15 Thread Prof Brian Ripley
[] works on a list and extracts multiple elements. However, that is not it seems what you want, rather, unions of elements of elements of lists. That is a pretty unusual need, and perhaps you could explain you you need it. Andy's solution still need something like do.call(c, lapply(alist,

[R] plotting predicted values (lines) over data?

2004-01-15 Thread Jeff D. Hamann
I've been trying to plot the predicted values, as a line, over the data for a simple nonlinear fit with the following commands: plot( hg ~ ht ) ... define some function hg ~ ht + junk ... ... blah, blah, obtain parameter estimates and predicted values, blah... ... then... lines( sort( $predicted

Re: [R] Extracting multiple elements from a list

2004-01-15 Thread Roger D. Peng
For the first case, I actually do this pretty often and usually use something like: as.vector(sapply(alist, [[, vec)) For the second case, I think you just need to use lapply(): alist - lapply(seq(along = alist), function(i) alist[[i]]$name - new.names[i]) -roger Waichler,

Re: [R] Extracting multiple elements from a list

2004-01-15 Thread Roger D. Peng
Sorry, that second example should be alist - lapply(seq(along = alist), function(i) { alist[[i]]$name - new.names[i]) alist }) -roger Roger D. Peng wrote: For the first case, I actually do this pretty often and usually use something like:

RE: [R] plotting predicted values (lines) over data?

2004-01-15 Thread Liaw, Andy
From: Jeff D. Hamann I've been trying to plot the predicted values, as a line, over the data for a simple nonlinear fit with the following commands: plot( hg ~ ht ) ... define some function hg ~ ht + junk ... ... blah, blah, obtain parameter estimates and predicted values, blah...

[R] SIR

2004-01-15 Thread hagric
Ich habe in R eine Version von SIR gefunden und ausprobiert. Leider kann diese multivariate Responses nicht verarbeiten. Gibt es in R eine ausgefeilte Version von SIR? __ [EMAIL PROTECTED] mailing list

[R] SIR

2004-01-15 Thread Vera Hofer
Ich habe in R eine Version von SIR gefunden und ausprobiert. Leider kann diese multivariate Responses nicht verarbeiten. Gibt es in R eine ausgefeilte Version von SIR? Danke für die Hilfe. V.H. __ [EMAIL PROTECTED] mailing list

RE: [R] Extracting multiple elements from a list

2004-01-15 Thread Waichler, Scott R
Brian described well the operation I would like to do. I'm not familiar with do.call() but I'll work on that. Yes, ideally I would like to access values throughout a list object with fully implict indexing, such as the invalid alist[[1:2]]$vec[c(2, 4)]. Notice I was hoping to subset anywhere in

[R] Multiple comparisons in R; multicomp

2004-01-15 Thread Patrick Giraudoux
Is there a fonction for multiple comparison tests (similar to multicomp in Splus) in a package of R? Thanks in advance for any hint... Cheers, Patrick Giraudoux University of Franche-Comté Department of Environmental Biology EA3184 af. INRA F-25030 Besançon Cedex tel.: +33 381 665 745

RE: [R] Multiple comparisons in R; multicomp

2004-01-15 Thread Andy Bunn
There is now a package in R called multcomp for general multiple comparisons that does things similar to the Splus library you mentioned. BTW, a search of the help archives for multicomp or multiple comparisons brings this up. HTH, Andy __ [EMAIL

Re: [R] plotting predicted values (lines) over data?

2004-01-15 Thread John Fox
Dear Jeff, I'm not sure that I follow entirely what you've done, but perhaps the following suggestions will help: (1) If the plotted curve isn't smooth because it's evaluated at too few x-values or at x-values that are too unevenly spaced, what about getting a sufficient number of predicted

Re: [R] Lattices: Cloud: Background

2004-01-15 Thread John Fox
Dear Adrienne, I'm aware of a couple of ways to get a white background in trellis graphics. One is lset(col.whitebg()). I hope that this helps, John At 07:04 PM 1/15/2004 +, Mueller, Adrienne wrote: Hi, There's probably some simple way of doing this, but I'm just not seeing it - How do I

Re: [R] Lattices: Cloud: Background

2004-01-15 Thread Roger D. Peng
Try trellis.par.set(background, list(col = 0)) Or you can explicitly launch the trellis device and set `bg = 0'. -roger Mueller, Adrienne wrote: Hi, There's probably some simple way of doing this, but I'm just not seeing it - How do I get the background to be white instead of grey when I have

[R] invoking R scripts from a linux shell ?

2004-01-15 Thread Enrico Curiotto
Hello, I have written perl programs that extract data from a text file, process them, and create other text files, which I'd like to apply some statistics too (for example with R). I'd like to do it all in once , with a single script. I'm not familiar with R, I'd like to know if this task could

[R] memory in R

2004-01-15 Thread Raphael Schoenle
Hi, How can I assign memory in R? My simulations are very slow. Thanks!, -R [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] random effects with lme() -- comparison with lm()

2004-01-15 Thread Jerome Asselin
Hi all, In the (very simple) example below, I have defined a random effect for the residuals in lme(). So the model is equivalent to a FIXED effect model. Could someone explain to me why lme() still gives two standard deviation estimates? I would expect lme() to return either: a) an error or a

[R] adjusted rand index

2004-01-15 Thread Ton van Daelen
Hi there - Is there a package that computes an adjusted rand index? Thanks a lot - Ton Ton van Daelen, PhD Director, Application Support Tel: (858) 279-8800 ext 217 Fax: (858) 279-8804 Web: www.scitegic.com   Register now for the 2004 Pipeline Pilot user group meeting Jan 28-30 in San Diego:

Re: [R] random effects with lme() -- comparison with lm()

2004-01-15 Thread Douglas Bates
Jerome Asselin [EMAIL PROTECTED] writes: Hi all, In the (very simple) example below, I have defined a random effect for the residuals in lme(). So the model is equivalent to a FIXED effect model. Could someone explain to me why lme() still gives two standard deviation estimates? I would

[R] fedora and yum

2004-01-15 Thread Erich Neuwirth
I just installed Fedora in VMWare. Can somebopdy tell me what lines i have to put in yum.conf so R will be automatically integrated in the package system and updated when a new release is available? -- Erich Neuwirth, Computer Supported Didactics Working Group Visit our SunSITE at

Re: [R] random effects with lme() -- comparison with lm()

2004-01-15 Thread Jerome Asselin
On Thu, 2004-01-15 at 16:30, Douglas Bates wrote: ...snip... (BTW, I wouldn't say that this is equivalent to a fixed effects model. It is still a random effects model with two variance components. It just doesn't have well-defined estimates for those two variance components.) Agreed.

RE: [R] invoking R scripts from a linux shell ?

2004-01-15 Thread Kort, Eric
-Original Message- From: Enrico Curiotto [mailto:[EMAIL PROTECTED] Hello, I have written perl programs that extract data from a text file, process them, and create other text files, which I'd like to apply some statistics too (for example with R). I'd like to do it all in once

Re: [R] Extracting multiple elements from a list

2004-01-15 Thread Julian Taylor
Waichler, Scott R wrote: Brian described well the operation I would like to do. I'm not familiar with do.call() but I'll work on that. Yes, ideally I would like to access values throughout a list object with fully implict indexing, such as the invalid alist[[1:2]]$vec[c(2, 4)]. Notice I

Re: [R] invoking R scripts from a linux shell ?

2004-01-15 Thread Itay Furman
On Thu, 15 Jan 2004, Enrico Curiotto wrote: Hello, I have written perl programs that extract data from a text file, process them, and create other text files, which I'd like to apply some statistics too (for example with R). I'd like to do it all in once , with a single script. I'm not

RE: [R] Lattices: Cloud: Background

2004-01-15 Thread Mulholland, Tom
When I first started using lattice I found the colour schemes a bit confusing. So eventually I came up with the colours I wanted. The code below was one of those attempts. One thing that happened however was that I kept shutting down the graphics window that pops up and the colours would revert