[R] Reading multiple files into R

2004-10-01 Thread Vikas Rawal
I want to read data from a number of files into R. Reading individual files one by one requires writing enormous amount of code that will look something like the following. maptools:::dbf.read(wb-01vc.dbf)-dist1 maptools:::dbf.read(wb-02vc.dbf)-dist2

RE: [R] Can't load rgl library

2004-10-01 Thread antonio rodriguez
Hi Thomas, Yes I have the xlibmesa-gl, libglu1-mesa, libglu1-mesa-dev, etc, libraries. But no way. You mentioned TLS (transport Layer Security?), is this OK? I'm working on a Toshiba laptop with graphics driver I852GM Cheers, Antonio -Mensaje original- De: [EMAIL PROTECTED]

Re: [R] Reading multiple files into R

2004-10-01 Thread Witold Eryk Wolski
Hi! There is a function ?dir which returns you the content of the dir_ectory. If this is more then there is a function ?grep which allows you to extract relevant items. If you need to postprocess the names you have a function ?paste for example. And finally you have an S language construct

Re: [R] Reading multiple files into R

2004-10-01 Thread Roger Bivand
On Fri, 1 Oct 2004, Vikas Rawal wrote: I want to read data from a number of files into R. Reading individual files one by one requires writing enormous amount of code that will look something like the following. maptools:::dbf.read(wb-01vc.dbf)-dist1

[R] two questions on nlme: error messages and nested variance

2004-10-01 Thread J
Hello: Im hoping the list can shed light on two items. I am using an nlme model to fit a logistic function and have these questions: 1) The model works fine using varIdent(~1|factor) and also using varComb(varIdent(~1|factor),varFixed(~covariate)), but not when varFixed(~covariate) is used

Re: [R] Reading multiple files into R

2004-10-01 Thread Paul Lemmens
Hoi Vikas, --On vrijdag 1 oktober 2004 10:50 +0530 Vikas Rawal [EMAIL PROTECTED] wrote: I want to read data from a number of files into R. Reading individual files one by one requires writing enormous amount of code that will look something like the following. Is there a better way of doing

Re: [R] Can't load rgl library

2004-10-01 Thread Thomas Schönhoff
antonio rodriguez schrieb: Hi Thomas, Yes I have the xlibmesa-gl, libglu1-mesa, libglu1-mesa-dev, etc, libraries. But no way. You mentioned TLS (transport Layer Security?), is this OK? I'm working on a Toshiba laptop with graphics driver I852GM No, just look at /usr/share/ to find a diretory

[R] gnls or nlme : how to obtain confidence intervals of fitted values

2004-10-01 Thread Pierre MONTPIED
Hi I use gnls to fit non linear models of the form y = alpha * x**beta (alpha and beta being linear functions of a 2nd regressor z i.e. alpha=a1+a2*z and beta=b1+b2*z) with variance function varPower(fitted(.)) which sounds correct for the data set I use. My purpose is to use the fitted models

Re: [R] Reading multiple files into R

2004-10-01 Thread Kevin Bartz
Roger Bivand wrote: On Fri, 1 Oct 2004, Vikas Rawal wrote: I want to read data from a number of files into R. Reading individual files one by one requires writing enormous amount of code that will look something like the following. maptools:::dbf.read(wb-01vc.dbf)-dist1

RE: [R] Can't load rgl library

2004-10-01 Thread antonio rodriguez
Hi Thomas antonio rodriguez schrieb: Hi Thomas, Yes I have the xlibmesa-gl, libglu1-mesa, libglu1-mesa-dev, etc, libraries. But no way. You mentioned TLS (transport Layer Security?), is this OK? I'm working on a Toshiba laptop with graphics driver I852GM No, just look at

[R] Rnewsletter article example

2004-10-01 Thread Samuel Kemp
Hi, I am trying to write an article for the Rnewsletter, but keep getting errors. I have googled around for some decent examples that contain figures, maths, etc but with no joy. Would any be so kind as to send me an example article in latex code? Cheers, Sam.

Re: [R] Rnewsletter article example

2004-10-01 Thread Witold Eryk Wolski
me too, E, Samuel Kemp wrote: Hi, I am trying to write an article for the Rnewsletter, but keep getting errors. I have googled around for some decent examples that contain figures, maths, etc but with no joy. Would any be so kind as to send me an example article in latex code? Cheers, Sam.

Re: [R] Rnewsletter article example

2004-10-01 Thread Uwe Ligges
Samuel Kemp wrote: Hi, I am trying to write an article for the Rnewsletter, but keep getting errors. I have googled around for some decent examples that contain figures, maths, etc but with no joy. Would any be so kind as to send me an example article in latex code? Cheers, I'll send one to

Re: [R] arima vs arima0

2004-10-01 Thread Martin Maechler
Nathaniel == Nathaniel B Derby [EMAIL PROTECTED] on Wed, 29 Sep 2004 12:19:51 -0700 (PDT) writes: Nathaniel What is the difference between arima and arima0? Mainly: arima0 is the predecessor of arima. AFAIK, it has only be retained for back-compatibility but shouldn't really be

[R] multiple dimensional diag()

2004-10-01 Thread Robin Hankin
Hi I have two arbitrarily dimensioned arrays, a and b, with length(dim(a))==length(dim(b)). I want to form a sort of corner-to-corner version of abind(), or a multidimensional version of blockdiag(). In the case of matrices, the function is easy to write and if a=matrix(1,3,4) and

[R] Background color Windows device (newbie)

2004-10-01 Thread Jean-Louis Abitbol
Dear R Gurus Just started on R ! Using xYplot from Hmisc (R 1.9, W2K) I get a grey/blue background that I would like to change to white (ie no background) or may be to another color. Tried to do that with par(bg) but only changed the color of the trellis heading. What's the right command to do

RE: [R] Background color Windows device (newbie)

2004-10-01 Thread Liaw, Andy
What you should realize is that xYplot() uses lattice, and that color theme is the default for lattice. trellis.device() has the `theme' argument that you can use to change it. The help page explains how you can change the default: theme: list of components that change the settings of the

Re: [R] Background color Windows device (newbie)

2004-10-01 Thread Chuck Cleland
See the bg argument to trellis.device(). Here is an example: library(Hmisc) library(lattice) trellis.device(width=7, height=5, new = TRUE, col = FALSE, bg = white) dfr - expand.grid(month=1:12, continent=c('Europe','USA'), sex=c('female','male')) set.seed(1) dfr -

Re: [R] dev.print and win.print

2004-10-01 Thread Prof Brian Ripley
Just format your plot suitably and select on the Windows driver portrait or landscape orientation. The rotation in the Windows device driver to landscape is exactly what postscript does for horizontal = TRUE (the default). It's just that Unix print commands do not have rotation built in (in

Re: [R] Rpy vs RSPython

2004-10-01 Thread Martin Maechler
Seth == Seth Falcon [EMAIL PROTECTED] on Thu, 30 Sep 2004 09:40:13 -0700 writes: Seth On Thu, Sep 30, 2004 at 09:57:53AM -0400, Rajarshi Guha wrote: Rpy seems easier to get up and running with, but does anybody have any comments regarding which would be a better system to work

Re: [R] Can grid lines color in a plot be specified?

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 07:44, Luis Rideau Cruz wrote: R-help Is there any way to specify the color of grid lines in a simple plot? par(color.tick.marks=c(grey)) plot(rnorm(10),tck=1) Thank you This is one approach: plot(rnorm(10)) # Now draw both axes axis(1, tck = 1, col = grey,

Re: [R] expand.model.frame gives object not found

2004-10-01 Thread Prof Brian Ripley
Why are you using expand.model.frame to update a *formula*? That is what update()'s formula method does. It is rather rare to use expand.model.frame() directly. As ever, we recommend reading a good book on R as applied to whatever you are trying to do -- several of them have examples of

Re: [R] Can grid lines color in a plot be specified?

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 08:15, Marc Schwartz wrote: On Fri, 2004-10-01 at 07:44, Luis Rideau Cruz wrote: R-help Is there any way to specify the color of grid lines in a simple plot? par(color.tick.marks=c(grey)) plot(rnorm(10),tck=1) Thank you Oknow that I have finished

Re: [R] R-2.0: roadmap? release statements? plans?

2004-10-01 Thread Prof Brian Ripley
On Fri, 1 Oct 2004, Khamenia, Valery wrote: I took a look at last 2 months post in R-help maillist Well, R-devel is about developments in R, and R-help is about help for end users. and surfed through the R-project.org . Unfortunately, I can't find some page with roadmap/statements about

Re: [R] biplot.princomp with loadings only

2004-10-01 Thread Prof Brian Ripley
Not and have a biplot, as defined by the person who named them. Have you bothered to read the references on the help page? Please read them (more carefully if necessary). On Thu, 30 Sep 2004, Christoph Lehmann wrote: is there a way to plot only the loadings in a biplot (with the nice

RE: [R] displaying sample size in boxplots

2004-10-01 Thread Warnes, Gregory R
Also note that boxplot.n in the gplots library (part of the gregmisc bundle) automatically adds the number of observations. -Greg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Patrick Drechsler Sent: Wednesday, September 29, 2004 1:47 PM To:

RE: [R] R-2.0: roadmap? release statements? plans?

2004-10-01 Thread Liaw, Andy
Just to keep Valery from thinking that that web page can not be easily found: Go to www.r-project.org and click on `Developer Page' under the heading `R Project'. A suggestion (for CRAN masters?): On CRAN there is a link to the NEWS file for the released version. Maybe it's a good idea to

[R] controlling colour in Trellis histogram

2004-10-01 Thread Bill Shipley
Hello. I am sorry for posting a (seemingly) simple question, but I have just spent 2 hours trying to find the answer, without success. I want to make a histogram with conditioning on a factor, using Trellis graphics. However, I do not want any colours (only black and white) either in the

Re: [R] R-2.0: roadmap? release statements? plans?

2004-10-01 Thread Bjørn-Helge Mevik
Well, you could download the latest beta-release and look in the NEWS file there. -- Bjørn-Helge Mevik __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] controlling colour in Trellis histogram

2004-10-01 Thread Chuck Cleland
Does this help? mydata - data.frame(OPTIMISM = c(29,35,26,22,30,37,29,32,25,35,38,33,41,28,40), PARENTS = rep(c(Both Deceased, One Deceased, Both Alive), c(4,5,6))) library(lattice) trellis.device(width=7, height=5, new = FALSE, col = FALSE, bg = white) histogram(~

RE: [R] Can grid lines color in a plot be specified?

2004-10-01 Thread davidr
I usually use something like abline(h=seq(...),col=green) abline(v=seq(...),col=green) This allows you to have irregularly spaced grid lines if you want. (Say for futures expiration dates in my case.) Also, as Marc pointed out, you may want to draw the lines or points after the grid lines.

Re: [R] controlling colour in Trellis histogram

2004-10-01 Thread Deepayan Sarkar
On Friday 01 October 2004 09:16, Bill Shipley wrote: Hello. I am sorry for posting a (seemingly) simple question, but I have just spent 2 hours trying to find the answer, without success. I want to make a histogram with conditioning on a factor, using Trellis graphics. However, I do not

RE: [R] controlling colour in Trellis histogram

2004-10-01 Thread John Fox
Dear bill, Try opening the Trellis graphics device with trellis.device(color=FALSE). I hope this helps, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Shipley Sent: Friday, October 01, 2004 9:17 AM To: R help list Subject: [R]

Re: [R] controlling colour in Trellis histogram

2004-10-01 Thread Deepayan Sarkar
On Friday 01 October 2004 09:25, Chuck Cleland wrote: Does this help? mydata - data.frame(OPTIMISM = c(29,35,26,22,30,37,29,32,25,35,38,33,41,28,40), PARENTS = rep(c(Both Deceased, One Deceased, Both Alive), c(4,5,6))) library(lattice) trellis.device(width=7,

[R] Lattice .ps graphic is rotated in LaTeX slides

2004-10-01 Thread Michael Friendly
I've generated a version of the classic dotplot of the barley data with library(lattice) data(barley) trellis.device(postscript, color=TRUE, file=barley2x3.ps) old.settings - trellis.par.get() trellis.par.set(background, list(col = white)) lset(list(superpose.symbol=list(pch=c(19, 1, 25, 2, 15,

RE: [R] Can grid lines color in a plot be specified?

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 09:31, [EMAIL PROTECTED] wrote: I usually use something like abline(h=seq(...),col=green) abline(v=seq(...),col=green) This allows you to have irregularly spaced grid lines if you want. (Say for futures expiration dates in my case.) Also, as Marc pointed out, you

Re: [R] R-2.0: roadmap? release statements? plans?

2004-10-01 Thread Peter Dalgaard
Khamenia, Valery [EMAIL PROTECTED] writes: Hi all, I took a look at last 2 months post in R-help maillist and surfed through the R-project.org . Unfortunately, I can't find some page with roadmap/statements about major changes coming in R-2.0 in comparison to R-1.9 Could anyone point me

[R] Problems in installing Rmpi library

2004-10-01 Thread Marco Chiarandini
dear all, I am trying to install the Rmpi library on a cluster but I obtain the following error, which concerns the dynamic libraries: Rmpi version: 0.4-8 Rmpi is an interface (wrapper) to MPI APIs with interactive R slave functionalities. See `library

Re: [R] multiple dimensional diag()

2004-10-01 Thread Peter Wolf
Here is a function that does what you want (perhaps): *= a.block.diag - function(a,b) { # a.block.daig combines arrays a and b and builds a new array which has # a and b as blocks on its diagonal. pw 10/2004 if(length(dim.a-dim(a))!= length(dim.b-dim(b))){ stop(a and b must have identical

Re: [R] Lattice .ps graphic is rotated in LaTeX slides

2004-10-01 Thread Peter Dalgaard
Michael Friendly [EMAIL PROTECTED] writes: ! Package graphics Error: Division by 0. What am I doing wrong, or how could I do it differently so it would work? You might try \usepackage{graphicx} instead. I seem to recall (vaguely) getting better results with that sometimes. -p --

Re: [R] Lattice .ps graphic is rotated in LaTeX slides

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 10:58, Peter Dalgaard wrote: Michael Friendly [EMAIL PROTECTED] writes: ! Package graphics Error: Division by 0. What am I doing wrong, or how could I do it differently so it would work? You might try \usepackage{graphicx} instead. I seem to recall (vaguely)

Re: [R] Lattice .ps graphic is rotated in LaTeX slides

2004-10-01 Thread Patrick Drechsler
Hi Michael, Michael Friendly wrote on 01 Oct 2004 16:09:45 MET: I've generated a version of the classic dotplot of the barley data with [sniped R-code] It looks fine with gv The image is in landscape format when viewed with gv. \begin{slide}

Re: [R] hier.part

2004-10-01 Thread Uwe Ligges
T. Murlidharan Nair wrote: I am using the hier.part package for calculating the goodness of fit. Before I started with my data I tried to use the example that the package comes with . I have loaded the library hier.part and gtools. But the package gives the following error Loading required

[R] Plotting panels at arbitrary places on a map, rather than on a lattice

2004-10-01 Thread Michael Dewey
I think it is easiest to describe what I want in terms of the concrete problem I have. I have data from a number of countries in each of which a sample of people was interviewed. In presenting the results in a forthcoming collaborative publication much emphasis will be placed on the multi-centre

Re: [R] Plotting panels at arbitrary places on a map, rather than on a lattice

2004-10-01 Thread Deepayan Sarkar
On Friday 01 October 2004 11:58, Michael Dewey wrote: I think it is easiest to describe what I want in terms of the concrete problem I have. I have data from a number of countries in each of which a sample of people was interviewed. In presenting the results in a forthcoming collaborative

Re: [R] Lattice .ps graphic is rotated in LaTeX slides - PDF weirdness

2004-10-01 Thread Peter Dalgaard
Barry Rowlingson [EMAIL PROTECTED] writes: Marc Schwartz wrote: The one advantage of the Beamer package, for those that require it, is that it supports pdflatex, which the others do not. Though, it can be used with dvips/latex + ps2pdf, where needed. Has anyone else hit the

Re: [R] Plotting panels at arbitrary places on a map, rather than on a lattice

2004-10-01 Thread Roger Bivand
On Fri, 1 Oct 2004, Michael Dewey wrote: I think it is easiest to describe what I want in terms of the concrete problem I have. I have data from a number of countries in each of which a sample of people was interviewed. In presenting the results in a forthcoming collaborative publication

Re: [R] hier.part

2004-10-01 Thread Uwe Ligges
T. Murlidharan Nair wrote: It still gives me the same error !! OK, what is your version of R, which OS, which library paths have you set, and is gregmisc installed in more than one of the libraries? What does it unzipped to gtools in your former mail mean (in particular: What is gtools?)? Uwe

Re: [R] hier.part

2004-10-01 Thread T. Murlidharan Nair
The R version I am using is 1.9.1 . My operating system is windows. gregmisc is installed in only one of the libraries. gregmisc when unzipped gets installed as gtools. After I looked at the index .html page I guess gtools is gregmisc so I am not sure why it is not happy. I can only include

Re: [R] hier.part

2004-10-01 Thread Roger Bivand
On Fri, 1 Oct 2004, Uwe Ligges wrote: T. Murlidharan Nair wrote: It still gives me the same error !! OK, what is your version of R, which OS, which library paths have you set, and is gregmisc installed in more than one of the libraries? What does it unzipped to gtools in your former

Re: [R] hier.part

2004-10-01 Thread Uwe Ligges
Roger Bivand wrote: On Fri, 1 Oct 2004, Uwe Ligges wrote: T. Murlidharan Nair wrote: It still gives me the same error !! OK, what is your version of R, which OS, which library paths have you set, and is gregmisc installed in more than one of the libraries? What does it unzipped to gtools in

Re: [R] Lattice .ps graphic is rotated in LaTeX slides - PDF weirdness

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 12:54, Peter Dalgaard wrote: Barry Rowlingson [EMAIL PROTECTED] writes: Marc Schwartz wrote: The one advantage of the Beamer package, for those that require it, is that it supports pdflatex, which the others do not. Though, it can be used with dvips/latex +

Re: [R] displaying sample size in boxplots

2004-10-01 Thread Patrick Drechsler
Gregory R. Warnes wrote on 01 Oct 2004 14:52:05 MET: [...] Here are the current proposals [for cut paste]: library(ISwR) data(energy) attach(energy) ## 1 boxplot(expend~stature) sample.size - tapply(expend, stature, length) ss.ch - paste(N=, sample.size, sep=) mtext(ss.ch,

Re: [R] Lattice .ps graphic is rotated in LaTeX slides - PDF weirdness

2004-10-01 Thread Achim Zeileis
On 01 Oct 2004 19:54:45 +0200 Peter Dalgaard wrote: Barry Rowlingson [EMAIL PROTECTED] writes: Marc Schwartz wrote: The one advantage of the Beamer package, for those that require it, is that it supports pdflatex, which the others do not. Though, it can be used with dvips/latex +

Re: [R] Lattice .ps graphic is rotated in LaTeX slides

2004-10-01 Thread Michael Friendly
That does indeed work! I had read the arguments section of ?postscript, but this will teach me to read the details. There could/should be a trellis.device(eps, ...) that supplies the appropriate defaults. For the perversely inclined I was able to use my original .ps file in this contorted

[R] 3d matrix * 1d matrix question

2004-10-01 Thread gene
Apologies for the rather newbie question, but I haven't been able to figure this out. I've got a 3d matrix (though presumably, the answer would be the same as for a 2d matrix) which I want to multiply by the values in a vector like so: matrix m is: , , 1 [,1] [,2] [1,]16 [2,]2

[R] cumsum over a list or an array

2004-10-01 Thread Stephane DRAY
Hello list, my question is related to svd of a matrix: b=matrix(rnorm(50),10,5) mysvd=svd(b) I would like to compute each xi where xi = di* ui %*% t(vi). I do it by : xlist=sapply(1:ncol(b), function(x1,y) y$d[x1]*y$u[,x1]%*%t(y$v[,x1]),y=mysvd,simplify=F) # result is a list

[R] dataload for linux

2004-10-01 Thread Jean Eid
Is there a dataload utility for linux. The link in genstat is down but I managed to find the utility at: http://gurukul.ucc.american.edu/econ/gaussres/UTILITYS/DATALOAD.HTM but this is a dos/windows version. Thank you Jean __ [EMAIL PROTECTED]

Re: [R] Lattice .ps graphic is rotated in LaTeX slides

2004-10-01 Thread Roger D. Peng
You might be encountering the infamous auto-rotation feature. In Unix you can turn it off via something like setenv GS_OPTIONS -dAutoRotatePages=/None (or the bash equivalent). -roger Michael Friendly wrote: I've generated a version of the classic dotplot of the barley data with

Re: [R] cumsum over a list or an array

2004-10-01 Thread Gabor Grothendieck
Stephane DRAY stephane.dray at umontreal.ca writes: : : Hello list, : : my question is related to svd of a matrix: : : b=matrix(rnorm(50),10,5) : mysvd=svd(b) : : I would like to compute each xi where xi = di* ui %*% t(vi). I do it by : : : xlist=sapply(1:ncol(b), function(x1,y) :