Re: [R] HTML help index generation problem with R under Windows

2005-02-09 Thread Prof Brian Ripley
On Wed, 9 Feb 2005 [EMAIL PROTECTED] wrote: I recently encountered a similar problem to http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg31960.html One conclusion from that thread seems to be that if XP users need to update the index, after installing a package, they have to install R into

[R] Contour plot

2005-02-09 Thread dhkblaszyk
x - log(1:10) y - log(1:10) z - 1:100 contour(matrix(z,ncol=10)) did not do what I expected it to do. I expected the contour lines to become compressed gradually. I believe you want to do: contour(x,y,matrix(z,ncol=10)) This will show the desired contour-plot. Kind regards, Darius

Re: Fw: [R] Contour plot

2005-02-09 Thread Petr Pikal
Hi Darius On 8 Feb 2005 at 17:43, [EMAIL PROTECTED] wrote: I understand that I need to have a (in this case) square matrix with all the data. But the question now is; - can the contourplot not interpolate the missing values or alternatively - I have fit a model to the z data (z = 100

Re: [R] panel plot with log-scaled x-axis

2005-02-09 Thread Dimitris Rizopoulos
I am not sure if this is what you want, but try: library(lattice) xyplot(conc~uptake|Treatment+Type, data=CO2, scales=list(x=list(log=TRUE))) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven

Re: FW: [R] Drawing maps of UK

2005-02-09 Thread Roger Bivand
On Wed, 9 Feb 2005, michael watson (IAH-C) wrote: Hi Guys Thanks for this! As I am a beginner, I bet I'm running into some really basic problems. Using the example from the Map2poly function in maptools: try - read.shape(euadmll.shp) mappolys - Map2poly(try) # this produces 14

[R] randomisation

2005-02-09 Thread Yann Clough
Dear useRs I am looking for a way to randomise the values within a matrix: the conditions are that the sums of the rows and the sums of the columns should remain the same as in the original matrix. Any help would be appreciated Cheers Yann __

Re: [R] randomisation

2005-02-09 Thread Peter Dalgaard
Yann Clough [EMAIL PROTECTED] writes: Dear useRs I am looking for a way to randomise the values within a matrix: the conditions are that the sums of the rows and the sums of the columns should remain the same as in the original matrix. Any help would be appreciated Er, explain

RE: [R] randomisation

2005-02-09 Thread John Fox
Dear Yann, Whether you can do this depends upon what you mean. If you mean randomly permute the elements of the matrix preserving row and column sums, then this generally won't be possible. Consider, e.g., matrix(1:4, 2, 2). If you mean generate a matrix with specified row and column sums but

Re: [R] randomisation

2005-02-09 Thread Yann Clough
I am working on an ecological problem and dealing with a matrix where rows correspond to samples, and columns correspond to species. The values in the matrix are recorded abundances of the organisms. I want to create a series of randomised datasets where total

RE: [R] randomisation

2005-02-09 Thread Peter Rabinovitch
This is not trivial. There is a really nice algorithm (should be simple to code up) due to Persi Diaconis, and described in example 1.22 (page 1-14) of Joseph Chang's notes on Markov chains available at http://www.stat.yale.edu/~jtc5/251/mc.pdf -Original Message- From: [EMAIL

[R] subset

2005-02-09 Thread Rogerio Rosa da Silva
Dear all, I am trying to extract rows from a data.frame based on the rowSums != 0.  I want to preserve rownames in the first column in the subset. Does anyone know how to extract all species that don't have rowSums equal to zero? Here it is: # dataset x - data.frame(

Re: [R] panel plot with log-scaled x-axis

2005-02-09 Thread Dimitris Rizopoulos
then try this: library(lattice) xyplot(conc~uptake|Treatment+Type, data=CO2, scales=list(x=list(log=TRUE, at=c(10^1, 10^1.2, 10^1.4, 10^1.6), labels=letters[1:4]))) Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven

Re: [R] randomisation

2005-02-09 Thread Jari Oksanen
On Wed, 2005-02-09 at 14:27 +0100, Yann Clough wrote: I am working on an ecological problem and dealing with a matrix where rows correspond to samples, and columns correspond to species. The values in the matrix are recorded abundances of the organisms. I want to create a

Re: [R] randomisation

2005-02-09 Thread Gabor Grothendieck
Yann Clough y.clough at NS1.uaoe.gwdg.de writes: : : Dear useRs : : I am looking for a way to randomise the values within a matrix: : the conditions are that the sums of the rows and the sums of the columns should : remain the same as in the original matrix. : ?r2dtable

Re: [R] randomisation

2005-02-09 Thread francoisromain
Selon Yann Clough [EMAIL PROTECTED]: Dear useRs I am looking for a way to randomise the values within a matrix: the conditions are that the sums of the rows and the sums of the columns should remain the same as in the original matrix. Any help would be appreciated Cheers Yann

Re: [R] subset

2005-02-09 Thread Chuck Cleland
subset(x, rowSums(x[,-1], na.rm=TRUE) != 0) Rogerio Rosa da Silva wrote: Dear all, I am trying to extract rows from a data.frame based on the rowSums != 0. I want to preserve rownames in the first column in the subset. Does anyone know how to extract all species that don't have rowSums equal to

Re: [R] subset

2005-02-09 Thread Dimitris Rizopoulos
you have answer it yourself: x[rowSums(x[,2:4])!=0,] Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/336899 Fax: +32/16/337015 Web:

RE: [R] subset

2005-02-09 Thread Liaw, Andy
Something like: x[rowSums(x[,-1]) 0,] species site1 site2 site3 site4 1sp.1 2 0 0 0 2sp.2 3 0 1 0 4sp.4 0 0 6 0 Andy From: Rogerio Rosa da Silva Dear all, I am trying to extract rows from a data.frame based on the rowSums

RE: [R] subset

2005-02-09 Thread John Fox
Dear Rogerio, x[rowSums(x[,2:5]) != 0,] should do what you want. I hope this helps, John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox

[R] Histogram Bar Spacing or Border Width

2005-02-09 Thread Thomas Hopper
Is there any way to control the spacing between bars in a histogram, or change the border width (I'm assuming the hist() function, though alternatives are welcome)? I'm interested in changing the visual spacing between columns in a plotted histogram. The general effect I'm looking for can be

[R] dput() error

2005-02-09 Thread Robin Hankin
Hi I'm trying to debug one of my functions, which stopped with the following message: Error in is.vector(x.star) : subscript out of bounds So I put a print(x.star) statement in just before the is.vector bit and got Error in print(x.star) : subscript out of bounds So I put dput(x.star) in and

Re: [R] panel plot with log-scaled x-axis

2005-02-09 Thread Deepayan Sarkar
On Wednesday 09 February 2005 04:07, Christoph Scherber wrote: Hi, I´ll try to rephrase my question using the following example: xyplot(conc~uptake|Treatment+Type,data=CO2) Would it be possible to make each of the x axes log-scaled Yes, with xyplot(conc ~ uptake | Treatment + Type, data

Re: [R] install RMySQL

2005-02-09 Thread Xander Meadow
Hi, I'm still trying to get RMySQL installed on my Mac. When I try and install from R (version 2.0.1) I'm told that the library libz can't be located. It suggests checking in /usr/lib to see if I have the necessary libraries. However, if I check /usr/lib I find I have the following:

Re: [R] randomisation

2005-02-09 Thread Yann Clough
Thanks to Gabor, Francois, Peter D., Jari, Peter R.and John r2dtable is what I was looking for, it implements the Patefield algorithm. Patefield, W. M. (1981) Algorithm AS159. An efficient method of generating r x c tables with given row and column totals. Applied Statistics 30, 91 97. This

[Fwd: Re: Fw: [R] Contour plot]

2005-02-09 Thread dhkblaszyk
Petr, It works perfectly! But I still have a question; I have fit the following data; x,y,z 1,10,11 2,11,15 3,12,21 4,13,29 5,14,39 6,15,51 7,16,65 8,17,81 9,18,99 10,19,119 dat.lm - lm(z~I(x^2)+y, data=dat) dat.lm Call: lm(formula = z ~ I(x^2) + y, data = dat) Coefficients: (Intercept)

[R] behaviour of all(NULL == c(a, b))

2005-02-09 Thread Matthias Burger
Hi all, I'm a little surprised at NULL == c(a, b) logical(0) all(NULL == c(a, b)) [1] TRUE Reading the documentation for all() this was not clear for me to be expected. Originally the question came up when using match.arg(NULL, c(a, b)) [1] a where I had thought an error would occur. So could

[R] efficient R code

2005-02-09 Thread Knut M. Wittkowski
Last Friday, Gregory Chaitin (http://www.umcs.maine.edu/~chaitin/lm.html) mentioned that there can be no proof that a given code is the shortest for a problem, even within a language. Still, the script below, a replacement of the TDT, one of the most frequently used tests in genetics

[R] Black and white lattice plots

2005-02-09 Thread David Parkhurst
How can I get lattice plots (with xyplot, etc.) to be produced in black and white, rather than in color? Im using R 2.0.1 under windows XP. (I'm not subscribed to the list, so would appreciate direct replies.) Thanks for any help. David Parkhurst __

Re: [R] Histogram Bar Spacing or Border Width

2005-02-09 Thread Prof Brian Ripley
A histogram is a density estimate (at least as defined in the Encyclopedia of Statistics Sciences, if not in many US Universities). It is an area, not a series of unrelated bars, so it makes no sense to have spaces between the subareas. Unfortunately, hist() will also produce barplots of

Re: [R] Histogram Bar Spacing or Border Width

2005-02-09 Thread Zachary Holden
Tom, I dealt with this once. barplot.data- c(2,3,4,5,6) x- barplot(barplot.data, ylim = c(0,10), space= .9,.9,.9,.9) use the space= to define the spacing between each of your barplot values. If you have groups of bars that you want together, with spaces between the groups, you have to put

Re: [R] dput() error

2005-02-09 Thread Peter Dalgaard
Robin Hankin [EMAIL PROTECTED] writes: Hi I'm trying to debug one of my functions, which stopped with the following message: Error in is.vector(x.star) : subscript out of bounds So I put a print(x.star) statement in just before the is.vector bit and got Error in

[R] Using %variable% object-column names in function

2005-02-09 Thread achilleas . psomas
Dear R-help.. I am rather new in R so i would appreciate your help in my problem.. I cant seem to be able to write a function that has arguments being objects and column names of these ojbects... A simple example code that doesnt work is the following.. auto_plot - function

Re: [R] behaviour of all(NULL == c(a, b))

2005-02-09 Thread Peter Dalgaard
Matthias Burger [EMAIL PROTECTED] writes: Hi all, I'm a little surprised at NULL == c(a, b) logical(0) all(NULL == c(a, b)) [1] TRUE Reading the documentation for all() this was not clear for me to be expected. all() over a vector of length zero is TRUE for much the same reason

[R] Job: Research Scientist Position at Insightful

2005-02-09 Thread Jill Goldschneider 327
Insightful is searching for a candidate to fill a technology position whose primary function is to develop commercial software for mixed-effects models and methods for analyzing longitudinal data, survival data, and missing data. Utilize your background in statistical algorithms, data analysis,

[R] Using %variable% object-column names in function

2005-02-09 Thread achilleas . psomas
Dear R-help.. I am rather new in R so i would appreciate your help in my problem.. I cant seem to be able to write a function that has arguments being objects and column names of these ojbects... A simple example code that doesnt work is the following.. auto_plot - function

Re: [R] behaviour of all(NULL == c(a, b))

2005-02-09 Thread Prof Brian Ripley
On Wed, 9 Feb 2005, Matthias Burger wrote: I'm a little surprised at NULL == c(a, b) logical(0) NULL is of length 0. == coerces arguments and recycles as required, so you have done as.character(NULL) == character(0) all(NULL == c(a, b)) [1] TRUE Reading the documentation for all() this was not

Re: [R] Black and white lattice plots

2005-02-09 Thread Deepayan Sarkar
On Wednesday 09 February 2005 09:50, David Parkhurst wrote: How can I get lattice plots (with xyplot, etc.) to be produced in black and white, rather than in color? Im using R 2.0.1 under windows XP. This happens automatically for postscript output. Otherwise, start your device with

Re: [R] behaviour of all(NULL == c(a, b))

2005-02-09 Thread Thomas Lumley
On Wed, 9 Feb 2005, Matthias Burger wrote: Hi all, I'm a little surprised at NULL == c(a, b) logical(0) all(NULL == c(a, b)) [1] TRUE Reading the documentation for all() this was not clear for me to be expected. This is related to the question about sum(numeric(0)) that came up a few days ago.

Re: [Fwd: Re: Fw: [R] Contour plot]

2005-02-09 Thread Adaikalavan Ramasamy
How about data.lm$model ? On Wed, 2005-02-09 at 16:32 +0100, [EMAIL PROTECTED] wrote: Petr, It works perfectly! But I still have a question; I have fit the following data; x,y,z 1,10,11 2,11,15 3,12,21 4,13,29 5,14,39 6,15,51 7,16,65 8,17,81 9,18,99 10,19,119 dat.lm -

Re: [R] efficient R code

2005-02-09 Thread Thomas Lumley
On Wed, 9 Feb 2005, Knut M. Wittkowski wrote: Last Friday, Gregory Chaitin (http://www.umcs.maine.edu/~chaitin/lm.html) mentioned that there can be no proof that a given code is the shortest for a problem, even within a language. I presume he said something more like `for some problems there is

Re: [R] behaviour of all(NULL == c(a, b))

2005-02-09 Thread Matthias Burger
thanks to Peter Daalgard, Brian Ripley, and Thomas Lumley for their quick, accurate and very helpful replies. My understanding of NULL was incorrect, thanks for making this clear. As for the question on match.arg I will use pmatch instead. Best, Matthias Thomas Lumley wrote: On Wed, 9 Feb

[R] Plotting: Plot several axis at right hand side of the plot

2005-02-09 Thread Jan Verbesselt
Hi all, I created a graph by plotting 4 time series on top of each other but don't know how to add extra axes on the right hand side of the plot (or leftside). For the first two time series it axis are plotted but the last two time series don't have and axis. How can these be added and where?

Re: [R] Using %variable% object-column names in function

2005-02-09 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Dear R-help.. I am rather new in R so i would appreciate your help in my problem.. I cant seem to be able to write a function that has arguments being objects and column names of these ojbects... A simple example code that doesnt work is the following.. auto_plot -

[R] help with plot hclust tree

2005-02-09 Thread shuangge
Hello, I will really appreciate some help with the following question. let's say cor.m is a correlation coefficient matrix. tree-hclust(as.dist(1-cor.m)); plot(tree); my question is: is it possible to add the correlation coefficient information to the plot? thanks, S. Ma

[R] gl and different number of replications

2005-02-09 Thread Rogério Rosa da Silva
I am trying to use the function gl (generate levels), and would like to make levels with different number of replications. Does anyone know how to generate different number of replications in each level? Something like: [1] Site1 Site1 Site1 Site1 Site1 Site1 Site1 [8] Site2 Site2 Site2 Site2

[R] install issue | suse 9.2

2005-02-09 Thread Dale Ryon Wilhelm
hello all... i am trying to install r v2.0.1 on my suse 9.2 pro box... when i run configure, i get the following error: checking how to get verbose linking output from g77... configure: WARNING: compilation failed checking for Fortran libraries of g77... checking for dummy main to

RE: [R] gl and different number of replications

2005-02-09 Thread Berton Gunter
Can't do it. gl is based on rep(), which easily does what you want: factor(rep(c('Site1','Site2'),c(7,5))) -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box

[R] Appending to list

2005-02-09 Thread Mike Prager
An R program needs to accumulate a list (length unknown until done) of objects. How efficiently and repeatedly can one append new objects to the list? I have been using something like mylist[[length(mylist)+1]] = newobject but I wonder if there is something better. -- Michael Prager NOAA

Re: [R] Histogram Bar Spacing or Border Width

2005-02-09 Thread Thomas Hopper
I understand the problem from a statistical perspective, and you make an excellent point (as I have come to expect, reading this list). However, I'm thinking about it from a visual/aesthetic perspective. Let me try this. Plot two histograms side-by-side: x - rnorm(10) par(mfcol=c(1,2))

Re: [R] Histogram Bar Spacing or Border Width

2005-02-09 Thread Thomas Hopper
I see where you're going...yes, I could create my own histogram distribution from the data and plot it using barplot (in fact, I've already achieved the visual effect I want with barplot, so I could just expand on that). I'm hoping that I can find a way to do it with hist() to avoid

Re: [R] Plotting: Plot several axis at right hand side of the plot

2005-02-09 Thread Uwe Ligges
Jan Verbesselt wrote: Hi all, I created a graph by plotting 4 time series on top of each other but don't know how to add extra axes on the right hand side of the plot (or leftside). For the first two time series it axis are plotted but the last two time series don't have and axis. How can these be

Re: [R] help with plot hclust tree

2005-02-09 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Hello, I will really appreciate some help with the following question. let's say cor.m is a correlation coefficient matrix. tree-hclust(as.dist(1-cor.m)); plot(tree); my question is: is it possible to add the correlation coefficient information to the plot? Which

Re: [R] Histogram Bar Spacing or Border Width

2005-02-09 Thread Prof Brian Ripley
A hint: hist() does no plotting. That is done by the histogram method of plot(), which you can copy and modify to your own needs/desires. Alternatively you can create myplot() and call myplot(hist(..., plot=TRUE), ...) On Wed, 9 Feb 2005, Thomas Hopper wrote: I understand the problem from a

Re: [R] gl and different number of replications

2005-02-09 Thread Gabor Grothendieck
Rogrio Rosa da Silva rrsilva at ib.usp.br writes: : : I am trying to use the function gl (generate levels), and would like to make : levels with different number of replications.Does anyone know how to : generate different number of replications in each level? : : Something like: : : [1]

Re: [R] Appending to list

2005-02-09 Thread Gabor Grothendieck
Mike Prager Mike.Prager at noaa.gov writes: : : An R program needs to accumulate a list (length unknown until done) of : objects. How efficiently and repeatedly can one append new objects to the : list? : : I have been using something like : : mylist[[length(mylist)+1]] = newobject : : but

[R] question about sorting POSIXt vector

2005-02-09 Thread bogdan romocea
Dear useRs, How come the first attempt to sort a POSIXt vector fails (Error: non-atomic type in greater), while the second succeeds? (Code inserted below.) The documentation says that POSIXt is used to allow operations such as subtraction, so I'd expect sorting to work. Is this perhaps an OS

Re: [R] question about sorting POSIXt vector

2005-02-09 Thread Gabor Grothendieck
bogdan romocea br44114 at yahoo.com writes: : : Dear useRs, : : How come the first attempt to sort a POSIXt vector fails (Error: : non-atomic type in greater), while the second succeeds? (Code inserted : below.) The documentation says that POSIXt is used to allow operations : such as

[R] installing package hier.part on Mac OSX

2005-02-09 Thread Theresa Talley
Hi- I've been trying to install the hier.part package on my mac (OSX 10.3.7) and it is not working for some reason. I am downloading the package source called : hier.part_1.0.tar.gz. When I try to auto install from the cran site, I get this message: * Installing *source* package 'hier.part' ...

[R] Looking for tools to run case crossover analysis

2005-02-09 Thread Arin Basu
Hi All: I am interested in tools available in R that will enable me to run analysis of case crossover studies. I searched the web (http://www.google.com), and found that a tool called funfit was available for Splus. Searching the R archives, I also found mention of a funfit library. However,

[R] Re: Packages and Libraries

2005-02-09 Thread A.J. Rossini
Hm. Everyone else got it (the reasons for the change). The reason is that beginners often fail to get it (package vs. library), and one of the contributing factors is the naming approach, which isn't clear. Certain people are rather sensitive to mistakes of this nature, so we end up with 2-3

Re: [R] cuttree

2005-02-09 Thread Ales Ziberna
I am not sure if I understad you correctly. Are you inrested in getting a list of units that belond to each group? Then do: branches-cutree(hc,k=2) group1-which(branches==1) group2-which(branches==2) Hope this helps! Ales Ziberna - Original Message - From: T. Murlidharan Nair [EMAIL

Re: [R] Re: Packages and Libraries

2005-02-09 Thread Prof Brian Ripley
On Wed, 9 Feb 2005, Spencer Graves wrote: The reasons to 'introduce package() and deprecate library()' may be OBVIOUS to you, but they completely escape me. Could you please clarify why that's obvious? I've seen many admonitions on this list that the term is package NOT library, but I

Re: [R] question about sorting POSIXt vector

2005-02-09 Thread Prof Brian Ripley
You can order (which is not the same as sort) POSIXct vectors but not POSIXlt ones. class() on your objects (or str(), but that only shows one class) would have been revealing. It is somewhat fortuitous that you can order and sort POSIXct vectors, as you are ordering the underlying numeric