Re: [R] build R source package in place from CVS?

2005-07-06 Thread Uwe Ligges
Duncan Murdoch wrote: Andrew Piskorski wrote: I'm currently using R CMD INSTALL to build and install some of my own custom R packages. Basically, I use a script which first builds a tarball of my R source code, and then calls R CMD INSTALL, which builds and installs that source package from

[R] Question about statistics

2005-07-06 Thread Roy Werkman
Hi, Although my question is not directly linked to R functionality, I hope you can forgive me for posing it here. I have been looking for the answer for a long time (~ 4 weeks) and have not been able to find it. My question is: Suppose I have an m*n matrix, with a random (normally distributed)

[R] [R-pkgs] batchfiles for Windows

2005-07-06 Thread Gabor Grothendieck
batchfiles, available on CRAN at http://cran.r-project.org/contrib/extra/batchfiles/ consists of a set of Windows XP batch files (they may run on NT/2000 too but that has not been tested) which facilitate: 1. starting R, automatically locating it in the registry each time they are run,

[R] How to sample x-y coordinates from GIS files

2005-07-06 Thread Kum-Hoe Hwang
Hi Gurus! I have a job that is to get randomly samples from point-based GIS data (sp called shape GIS files) under the total sum resctricted. For example, I would like to take random smaples under the 1000 persons in each city. The randomly sampled persons should not be over 1000 any case.

Re: [R] How to sample x-y coordinates from GIS files

2005-07-06 Thread halldor bjornsson
Check out the maptools package. It allows you to read ESRI shapefiles. On 7/6/05, Kum-Hoe Hwang [EMAIL PROTECTED] wrote: Hi Gurus! I have a job that is to get randomly samples from point-based GIS data (sp called shape GIS files) under the total sum resctricted. For example, I would like

Re: [R] multivariate lme?

2005-07-06 Thread Douglas Bates
Neither lme nor lmer has provision for fitting multivariate models. On 7/5/05, Constantinos Antoniou [EMAIL PROTECTED] wrote: Dear all, is it possible to estimate a multivariate multilevel model in R (I guess the term in R is mixed-effects model). I can estimate univariate models using

Re: [R] Java and R help

2005-07-06 Thread Mario de Frutos Dieguez
Mario de Frutos Dieguez escribió: Im doing an aplication in Java and i have a program made in R what i want to launch with Java. I have the following instructions: Runtime r = Runtime.getRuntime(); try { System.out.println (Llamada a R...); p = r.exec(sRutaR);

Re: [R] How to sample x-y coordinates from GIS files

2005-07-06 Thread ecoinfo
GIS-related packages in R: shapefiles maptools sp spdep adehabitat GRASS PBSmapping etc. --Xiaohua On 7/6/05, Kum-Hoe Hwang [EMAIL PROTECTED] wrote: Hi Gurus! I have a job that is to get randomly samples from point-based GIS data (sp called shape GIS files) under the total sum

[R] sktest output

2005-07-06 Thread Emukule, Gideon
Hello, I've run the sktest command to test for the normality of a variable but I do not understand the output. How do I interpret the output? Gideon Osoma [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

[R] R COM classes

2005-07-06 Thread Gaurav Gupta
Hi all, I am trying to call R programs from VB.NET. For this purpose I published a simple R COM class with proper registry values. After this step, I am not able to call the COM object from .NET. I cannot find the reference component name for R in .NET. All the examples provided on R website are

[R] Plotting confidence intervals for lme

2005-07-06 Thread Ghislain Vieilledent
Hello and sorry to disturb. I'm trying to plot the confidence intervals for the fixed effects of a lme. I want to obtain graphically, if it is possible, a bar with Estimate, upper and lower CI for each level of the factors. I know how to do for a lm model but for a lme one, I tried with

Re: [R] timezone problems

2005-07-06 Thread Don MacQueen
How did you set the TZ system variable? If you did not use Sys.putenv(), try using it instead. Otherwise, I think you have to ask the package maintainer. You may be misleading yourself by using Sys.time() to test whether TZ is set. What does Sys.getenv() tell you? I get a timezone code from

[R] function for maximum entropy distributions

2005-07-06 Thread Bill Shipley
Hello. I have written a function (Maxent), based on the improved iterative scaling algorithm of Della Pietra et al., that calculates the maximum entropy distribution given moment constraints. That is, it obtains the probability distribution (p) with maximum entropy given constraints linear in p.

[R] how to split several objects' names

2005-07-06 Thread wu sz
Hello, I have a string like O1 O2 O3, O1, O2 and O3 are the names of three objects. How to split it into a vector or three new objects, and obtain their content? I try to use strsplit to do that, but seems it doesn't work like that. And what is - for? the same as -? Thank you, Shengzhe

[R] Error message NA/NaN/Inf in foreign function call (arg 6) when using knn()

2005-07-06 Thread Kerri-Ann Norton
I am trying to use knn to do a nearest neighbor classification. I tried using my dataset and got an error message so I used a simple example to try and understand what I was doing wrong and got the same message. Here is what I typed into R: try [,1] [,2] [,3] [,4] r A A T G r A A T

Re: [R] how to split several objects' names

2005-07-06 Thread Sundar Dorai-Raj
wu sz wrote: Hello, I have a string like O1 O2 O3, O1, O2 and O3 are the names of three objects. How to split it into a vector or three new objects, and obtain their content? I try to use strsplit to do that, but seems it doesn't work like that. Please provide an example of what you

Re: [R] Question about statistics

2005-07-06 Thread Spencer Graves
What do you think about the following: library(nlme) set.seed(1) n - 3;m - 4 s.e - 0 (X0 - array(rep(rnorm(n), each=m)+s.e*rnorm(m*n), dim=c(m, n))) s.e - 1 (X1 - array(rep(rnorm(n), each=m)+s.e*rnorm(m*n), dim=c(m, n))) X. - data.frame(Row=as.vector(row(X)),

Re: [R] Lack of independence in anova()

2005-07-06 Thread Phillip Good
Do you or Lumley have a citation for this conclusion? Most people go forward with the ANOV on the basis that the various tests are independent. Phillip Good P.S. Tests based on the method of synchronized permutations are independent. -Original Message- From: Douglas Bates

Re: [R] Plotting confidence intervals for lme

2005-07-06 Thread Spencer Graves
Consider the following extension of an example in ?lme: fm2 - lme(distance ~ age + Sex, data = Orthodont, random = ~ 1) int - intervals(fm2) class(int$fixed) kf - dim(int$fixed)[1] plot(int$fixed[,2], kf:1, xlab=x, ylab=, xlim=range(int$fixed), axes=FALSE) axis(1) axis(2,

Re: [R] Lack of independence in anova()

2005-07-06 Thread Thomas Lumley
On Wed, 6 Jul 2005, Phillip Good wrote: Do you or Lumley have a citation for this conclusion? Most people go forward with the ANOV on the basis that the various tests are independent. I don't have a citation. I would have thought that the claim that they were independent was more in need of

Re: [R] Lack of independence in anova()

2005-07-06 Thread Spencer Graves
I'm confused: I understood Doug to be describing a traditional, normal theory ANOVA with k rows in the table for different effects plus a (k+1)st for residuals and the mean squares (MS) column are all indpendent chi-squares scaled by the same unknown sigma^2. The k statistics in

[R] Interactive Graphics

2005-07-06 Thread Brett Magill
What is the status of interactive graphics in R? I am thinking along the lines of what is provided by something like datadesk: http://www.datadesk.com/products/data_analysis/datadesk/index.shtml I have tried RGGobi in the past, but found it clumsy (at least on Windows XP). RGL and iplots

Re: [R] Lack of independence in anova()

2005-07-06 Thread Douglas Bates
On 7/6/05, Phillip Good [EMAIL PROTECTED] wrote: Do you or Lumley have a citation for this conclusion? Most people go forward with the ANOV on the basis that the various tests are independent. Phillip Good P.S. Tests based on the method of synchronized permutations are independent.

Re: [R] Lack of independence in anova()

2005-07-06 Thread Douglas Bates
On 7/6/05, Douglas Bates [EMAIL PROTECTED] wrote: ... Perhaps we could review the sequence of events here. This exchange began with your sending me a message claiming that there is a bug in lm or anova in R because the results of your simulation were what you expected. I meant to write

Re: [R] Lack of independence in anova()

2005-07-06 Thread Phillip Good
spencer graves asks: How is the method of synchronized permutations relevant to a traditional, normal theory ANOVA? One ought now ask as I am doing currently whether traditional, normal theory ANOVA is applicable to the analysis of experimental designs. If in fact, the results of the various

Re: [R] Lack of independence in anova()

2005-07-06 Thread Duncan Murdoch
On 7/6/2005 1:43 PM, Phillip Good wrote: spencer graves asks: How is the method of synchronized permutations relevant to a traditional, normal theory ANOVA? One ought now ask as I am doing currently whether traditional, normal theory ANOVA is applicable to the analysis of experimental

[R] rlm/M/MM-estimator questions

2005-07-06 Thread Christian Hennig
Hi list, 1) How can the MM-estimator method=MM in function rlm be tuned to 85% efficiency? It seems that there is a default tuning to 95%. I presume, but am not sure, that the MM-estimator uses phi=phi.bisquare as default and the tuning constant could be set by adding a parameter c=... Is this

[R] plotting on a reverse log scale

2005-07-06 Thread Michael Friendly
I'd like to do some plots of historical event data on a reverse log scale, started, say at the year 2000 and going backwards in time, with tick marks spaced according to log(2000-year). For example, see: http://euclid.psych.yorku.ca/SCS/Gallery/images/log-timeline.gif As an example, I'd like

Re: [R] Lack of independence in anova()

2005-07-06 Thread Ted Harding
On 06-Jul-05 Phillip Good wrote: Do you or Lumley have a citation for this conclusion? Most people go forward with the ANOV on the basis that the various tests are independent. This hardly needs a citation -- Thomas Lumley's explanation (excerpted below from Doug Bates's mail) is

Re: [R] Lack of independence in anova()

2005-07-06 Thread JRG
On 6 Jul 2005 at 12:30, Douglas Bates wrote: On 7/6/05, Douglas Bates [EMAIL PROTECTED] wrote: ... Perhaps we could review the sequence of events here. This exchange began with your sending me a message claiming that there is a bug in lm or anova in R because the results of your

Re: [R] Lack of independence in anova()

2005-07-06 Thread Spencer Graves
As Duncan Murdoch indicated, the primary issue is not that the different tests are (not) statitically independent but that they are sensitive to different alternative hypotheses. spencer graves JRG wrote: On 6 Jul 2005 at 12:30, Douglas Bates wrote: On 7/6/05, Douglas

Re: [R] plotting on a reverse log scale

2005-07-06 Thread Spencer Graves
Do you want to move year 2000 to Inf? How about a cube root transformation instead: year - seq(0, 4000, 100) y2000.3 - (sign(year-2000)* abs(year-2000)^(1/3)) plot(y2000.3, year, axes=FALSE) axis(1, y2000.3, year) axis(2) Of course, one should package the

Re: [R] plotting on a reverse log scale

2005-07-06 Thread Duncan Murdoch
On 7/6/2005 3:36 PM, Michael Friendly wrote: I'd like to do some plots of historical event data on a reverse log scale, started, say at the year 2000 and going backwards in time, with tick marks spaced according to log(2000-year). For example, see:

[R] Tempfile error

2005-07-06 Thread Doran, Harold
Dear List: I am encountering an error that I can't resolve. I'm looping through rows of a dataframe to generate individual tex files using Sweave. At random points along the way, I encounter the following error Error in file() : cannot find unused tempfile name At which point Sweave halts.

[R] Graphics: calling par(mar) after frame()

2005-07-06 Thread Brahm, David
The following code produces 6 plots on a page, but the first is distorted and different from the others: par(mfrow=c(3,2), las=2) for (i in 1:6) { frame() par(mar=c(7, 7, 1, 1)) axis(2); box(); abline(h=seq(0,1,.5), col=2:4) } The first plot's axes are mis-aligned with the plotting area

Re: [R] Interactive Graphics

2005-07-06 Thread Uwe Ligges
Brett Magill wrote: What is the status of interactive graphics in R? I am thinking along the lines of what is provided by something like datadesk: http://www.datadesk.com/products/data_analysis/datadesk/index.shtml I have tried RGGobi in the past, but found it clumsy (at least on

Re: [R] plotting on a reverse log scale

2005-07-06 Thread Michael Friendly
Thanks Duncan, That is almost exactly what I want, except I want time to go in the normal order, not backwards, so: # plot on reverse log scale years1500 - runif(500, 1500, 1990) # some fake data x - -log(2000-years1500) from - -log(2000-1990) to - -log(2000-1500) plot(density(x, from=from,

Re: [R] Graphics: calling par(mar) after frame()

2005-07-06 Thread Uwe Ligges
Brahm, David wrote: The following code produces 6 plots on a page, but the first is distorted and different from the others: par(mfrow=c(3,2), las=2) for (i in 1:6) { frame() par(mar=c(7, 7, 1, 1)) axis(2); box(); abline(h=seq(0,1,.5), col=2:4) } The first plot's axes are

Re: [R] plotting on a reverse log scale

2005-07-06 Thread Duncan Murdoch
Michael Friendly wrote: Thanks Duncan, That is almost exactly what I want, except I want time to go in the normal order, not backwards, so: # plot on reverse log scale years1500 - runif(500, 1500, 1990) # some fake data x - -log(2000-years1500) from - -log(2000-1990) to -

Re: [R] plotting on a reverse log scale

2005-07-06 Thread Duncan Murdoch
Stupid me, I put my comment in the wrong place. Ignore my last message, this one should be right: Michael Friendly wrote: Thanks Duncan, That is almost exactly what I want, except I want time to go in the normal order, not backwards, so: # plot on reverse log scale years1500 - runif(500,

[R] pretty for date-time?

2005-07-06 Thread davidr
pretty() works well for numbers and axTicks() can help for potting log axes, but has anyone written a pretty for chron objects (or other date or date-time classes)? It would have natural units of years, months, .., days, hours, (minutes?), and it would choose the appropriate unit based on the

[R] Help: Mahalanobis distances between 'Species' from iris

2005-07-06 Thread Jose Claudio Faria
Dear R list, I'm trying to calculate Mahalanobis distances for 'Species' of 'iris' data as obtained below: Squared Distance to Species From Species: Setosa Versicolor Virginica Setosa 0 89.86419 179.38471 Versicolor 89.86419 0 17.20107 Virginica

Re: [R] plotting on a reverse log scale

2005-07-06 Thread Gabor Grothendieck
Not sure if I am missing something essential here but it would seem as simple as: # data set.seed(1) x - runif(500, 1500, 1990) # plot d - density(x, from = 1500, to = 1990) plot(d$y ~ d$x, log = x) rug(x) axis(1, seq(1500, 1990, 10), FALSE, tcl = -0.3) On 7/6/05, Michael Friendly [EMAIL

Re: [R] pretty for date-time?

2005-07-06 Thread Duncan Murdoch
[EMAIL PROTECTED] wrote: pretty() works well for numbers and axTicks() can help for potting log axes, but has anyone written a pretty for chron objects (or other date or date-time classes)? It would have natural units of years, months, .., days, hours, (minutes?), and it would choose the

Re: [R] Graphics: calling par(mar) after frame()

2005-07-06 Thread Brahm, David
I wrote: par(mfrow=c(3,2), las=2) for (i in 1:6) { frame() par(mar=c(7, 7, 1, 1)) axis(2); box(); abline(h=seq(0,1,.5), col=2:4) } The first plot's axes are mis-aligned with the plotting area... Uwe Ligges [EMAIL PROTECTED] replied: Yes expected, at first you generate the plot, then

Re: [R] Lack of independence in anova()

2005-07-06 Thread Göran Broström
On Wed, Jul 06, 2005 at 10:06:45AM -0700, Thomas Lumley wrote: (...) If X, Y, and Z are independent and Z takes on more than one value then X/Z and Y/Z can't be independent. Not really true. I can produce a counterexample on request (admittedly quite trivial though). Göran Broström

[R] How to perform LSD or HSD tests with glm or lm

2005-07-06 Thread Ray Xiong
Dear All, I knew how to use glm or lm, but I do not know how to perform LSD or HSD on treatments with them. If someone can help me out, I greatly appreciate it. Have a nice weekend. Ray __ R-help@stat.math.ethz.ch mailing list

Re: [R] Lack of independence in anova()

2005-07-06 Thread Ted Harding
On 06-Jul-05 Göran Broström wrote: On Wed, Jul 06, 2005 at 10:06:45AM -0700, Thomas Lumley wrote: (...) If X, Y, and Z are independent and Z takes on more than one value then X/Z and Y/Z can't be independent. Not really true. I can produce a counterexample on request (admittedly quite

Re: [R] Lack of independence in anova()

2005-07-06 Thread Spencer Graves
Hi, Göran: I'll bite: (a) I'd like to see your counterexample. (b) I'd like to know what is wrong with my the following, apparently defective, proof that they can't be independent: First consider indicator functions of independent events A, B, and C.

[R] Interpreting ANOV output

2005-07-06 Thread Phillip Good
My thanks to Douglas Bates and others for pointing out ANOV's limitations. Now the question is how to put my new won knowledge into practice. Before my eyes were opened if row effect and interaction were both statistically significant I would report the row effects separately for each

Re: [R] Lack of independence in anova()

2005-07-06 Thread Duncan Murdoch
(Ted Harding) wrote: On 06-Jul-05 Göran Broström wrote: On Wed, Jul 06, 2005 at 10:06:45AM -0700, Thomas Lumley wrote: (...) If X, Y, and Z are independent and Z takes on more than one value then X/Z and Y/Z can't be independent. Not really true. I can produce a counterexample on request

Re: [R] Lack of independence in anova()

2005-07-06 Thread Duncan Murdoch
Spencer Graves wrote: Hi, Göran: I'll bite: (a) I'd like to see your counterexample. (b) I'd like to know what is wrong with my the following, apparently defective, proof that they can't be independent: First consider indicator functions of independent events A, B, and

[R] CDF plot

2005-07-06 Thread huang min
Dear all, I have define a discrete distribution P(y_i=x_i)=p_i, which I want to plot a CDF plot. However, I can not find a function in R to draw it for me after searching R and R-archive. I only find the one for the sample CDF instead my theoretical one. I find stepfun can do it for me, however,

Re: [R] Lack of independence in anova()

2005-07-06 Thread Spencer Graves
Hi, Duncan Göran: Consider the following: X, Y, Z have symmetric distributions with the following restrictions: P(X=1)=P(X=-1)=x with P(|X|1)=0 so P(|X|1)=1-2x. P(Y=1)=P(Y=-1)=y with P(|Y|1)=0 so P(|Y|1)=1-2y. P(Z=1)=P(Z=-1)=z with P(|Z|1)=0 so

Re: [R] CDF plot

2005-07-06 Thread Douglas Bates
On 7/6/05, huang min [EMAIL PROTECTED] wrote: Dear all, I have define a discrete distribution P(y_i=x_i)=p_i, which I want to plot a CDF plot. However, I can not find a function in R to draw it for me after searching R and R-archive. I only find the one for the sample CDF instead my

Re: [R] plotting on a reverse log scale

2005-07-06 Thread Marc Schwartz
I thought that I would take a stab at this. I should note however that my solution is heavily biased by the first log scale plot that Michael referenced below. To wit, my x axis has major ticks at powers of 10 and minor ticks at 1/10 of each major tick interval. Thus, here is my approach: # Set

Re: [R] How to perform LSD or HSD tests with glm or lm

2005-07-06 Thread Spencer Graves
TukeyHSD in package base works with aov objects. simint in package multcomp has many more options. RSiteSearch(Tukey HSD), and RSiteSearch(LSD) also produced some interesting reading, including cautions by two of the leading contributors to R and to this list

[R] traceback and passing data frame

2005-07-06 Thread Daniel E. Ho
Hello, Is there a way to suppress traceback() from returning the full structure of a dataframe that is passed internally in a function? As a simple toy example, suppose we had two functions that pass a dataframe internally: data(Formaldehyde) fn2 - function(formula, data, ...) { res -

Re: [R] rlm/M/MM-estimator questions

2005-07-06 Thread Kjetil Brinchmann Halvorsen
Christian Hennig wrote: Hi list, 1) How can the MM-estimator method=MM in function rlm be tuned to 85% efficiency? It seems that there is a default tuning to 95%. I presume, but am not sure, that the MM-estimator uses phi=phi.bisquare as default and the tuning constant could be set by adding a

Re: [R] Tempfile error

2005-07-06 Thread Sean O'Riordain
Hi Harold, I know nothing about Sweave (though it certainly sounds like a great idea!). Does Sweave hold these files open simultaneously - many operating systems wouldn't be able to cope with 20,000 simultaneously open files. Could you be running out of disk space? or inodes - if you're on a