Re: [R] contriburl argument to install.packages

2004-07-16 Thread Uwe Ligges
Roger D. Peng wrote: Hmm...is this maybe a bug? Check out this section of install.packages(): localcran <- length(grep("^file:", contriburl)) > 0 if (!localcran) { if (is.null(destdir)) { tmpd <- tempfile("Rinstdir") if (!dir.create(tmpd)) st

[R] labels for 3d Plots

2004-07-16 Thread Martina Renninger
High! How can I add variable labels (rownames for instance) to a plot created with ‚clouds’ ( clouds(dim3~dim1*dim2)) – package lattice? Thanks in advance! Martina Renninger [[alternative HTML version deleted]] __ [EMAIL PROTECTED]

Re: [R] labels for 3d Plots

2004-07-16 Thread Uwe Ligges
Martina Renninger wrote: High! How can I add variable labels (rownames for instance) So, dou you mean the variable label or stuff in rownames??? What about cloud(1:10~1:10+1:10, xlab="x", ylab="y", zlab="z") > to a plot created with ‚clouds’ ( clouds(dim3~dim1*dim2)) – package lattice? It is c

[R] Fixed and random factors in aov()

2004-07-16 Thread Sven Garbade
Hi, I'm confused about how to specify random and fixed factors in an aov() term. I tried to reproduce a textbook example: One fixed factor (Game, 4 levels) and one random factor (Store, 12 levels), response is Points. The random factor Store is nested in Game. I tried > str(kh.df) `data.frame':

Re: [R] Fixed and random factors in aov()

2004-07-16 Thread Dimitris Rizopoulos
Hi Sven, I think that you could also use `lme', i.e., something like: library(nlme) lme1 <- lme(Points~Game, random=~1|Store, data=kh.df) lme2 <- lme(Points~Game, random=~1|Store/Game, data=kh.df) anova(lme1) anova(lme2) anova(lme1, lme2) I hope this helps. Best, Dimitris Dimitris Rizopo

Re: [R] Fixed and random factors in aov()

2004-07-16 Thread Ioannis Dimakos
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dimitris Rizopoulos wrote: maybe the following is working? aov(Points~Game*Store+Error(subj+Store:subj)) IKD | Hi Sven, | | I think that you could also use `lme', i.e., something like: | | library(nlme) | lme1 <- lme(Points~Game, random=~1|Store, data=

[R] Block Bootstrap Simulation

2004-07-16 Thread Campbell
I am trying to run a time series block bootstrap. I have a dataset of length t = n*k. I want to sample n blocks of length k from the data. I don't want to use loop because a) the overhead and b) I'm comparing it with another technique that doesn't require a loop, and programming the simulatio

[R] marginal homogeneity in n by n tables (n > 2)

2004-07-16 Thread Von Bing Yap
Hello, Is there a function that finds the most likely probabilities p_ij with the marginal homogeneity constraint p_i. = p_.i, all i, for an n by n table, n > 2? For n = 2, mcnemar.test does it. Any analogous function for n > 2? Thanks, Von Bing -

[R] small problem with predict

2004-07-16 Thread Anne
hello to all! I have a small problem wit predict() for lm Let's say I have predictors x1 and x2, response y I want to predict for a new ds say dn<-data.frame(x1= seq(min(x1),max(x1),length=10),x2=rep(median(x2),10)) predict(lm(y~x1+x2),dn,se.fit=T) Error message > Error: variables 'x1', 'x2'

Re: [R] Block Bootstrap Simulation

2004-07-16 Thread Ingmar Visser
On 7/16/04 11:51 AM, "Campbell" <[EMAIL PROTECTED]> wrote: > I don't want to use loop because a) the overhead and b) I'm comparing it with > another technique that doesn't require a loop, and programming the simulation > without the loop gave me an insight into the solution of the problem > Is the

Re: [R] small problem with predict

2004-07-16 Thread Petr Pikal
Hi On 16 Jul 2004 at 12:38, Anne wrote: > hello to all! > > I have a small problem wit predict() for lm > > Let's say I have predictors x1 and x2, response y > > I want to predict for a new ds say > dn<-data.frame(x1= > seq(min(x1),max(x1),length=10),x2=rep(median(x2),10)) > > predict(lm(y~x1

Re: [R] small problem with predict

2004-07-16 Thread Petr Pikal
Hi Ann As I read your code mode closely, I suspect that there could be another variables x1 and x2 somewhere in your search path which led to the error. With fresh R session without any data this works as expected dold<-data.frame(x1=rnorm(10),x2=5*rnorm(10)) y<-1:10 predict(lm(y~x1+x2,dold),d

Re: [R] small problem with predict

2004-07-16 Thread Rolf Turner
You wrote: > I have a small problem wit predict() for lm > > Let's say I have predictors x1 and x2, response y > > I want to predict for a new ds say > dn<-data.frame(x1= seq(min(x1),max(x1),length=10),x2=rep(median(x2),10)) > > predict(lm(y~x1+x2),dn,se.fit=T) > > > Error message > > Error:

[R] Stumped on methods

2004-07-16 Thread Jim Lemon
I have been trying to write a "proper" print method for a package, and have almost gotten what I want. From a reading of the relevant section in R Extensions and the introduction to methods, I've stuck the whole business into a character object and used: NextMethod("print") However, instead of

Re: [R] contriburl argument to install.packages

2004-07-16 Thread Roger D. Peng
Argh, yes. I forgot I was using R 1.9.0. Everything works correctly in 1.9.1. -roger Uwe Ligges wrote: Roger D. Peng wrote: Hmm...is this maybe a bug? Check out this section of install.packages(): localcran <- length(grep("^file:", contriburl)) > 0 if (!localcran) { if (is.null

Re: [R] small problem with predict

2004-07-16 Thread Anne
Thanks Petr, That was indeed the root of the problem! Have a nice week end Anne In fact it must be the problem - Original Message - From: "Petr Pikal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Anne" <[EMAIL PROTECTED]> Sent: Friday, July 16, 2004 1:39 PM Subject: Re: [R] small pr

Re: [R] Stumped on methods

2004-07-16 Thread Roger D. Peng
If a method is hidden in a namespace, use getAnywhere(print.whatever) to see the code. -roger Jim Lemon wrote: I have been trying to write a "proper" print method for a package, and have almost gotten what I want. From a reading of the relevant section in R Extensions and the introduction to me

Re: [R] Stumped on methods

2004-07-16 Thread Uwe Ligges
Jim Lemon wrote: I have been trying to write a "proper" print method for a package, and have almost gotten what I want. From a reading of the relevant section in R Extensions and the introduction to methods, I've stuck the whole business into a character object and used: NextMethod("print") Wel

RE: [R] Stumped on methods

2004-07-16 Thread Liaw, Andy
Jim, As Uwe said, that's not what NextMethod() is for. I suspect what you really want is simply cat()ing the object that you created in your print() method. If you look in must print() and summary() methods, you'll see a lot of cat(). HTH, Andy > From: Uwe Ligges > > Jim Lemon wrote: > > > I

[R] rd2dvi bug on windoze?

2004-07-16 Thread Hiroyuki Kawakatsu
hi, can anyone confirm the following problem? when i do dos> rcmd rd2dvi --pdf my-package-name i get dos> Can't open perl script "c:\PROGRA~1\r\rw1091/bin/rd2dvi": No such file or directory might the problem be in (double back slashes rather than forward slashes) R-1.9.1\src\gnuwin32\front-e

Re: [R] rd2dvi bug on windoze?

2004-07-16 Thread Duncan Murdoch
On Fri, 16 Jul 2004 13:52:21 +0100, Hiroyuki Kawakatsu <[EMAIL PROTECTED]> wrote : >hi, > >can anyone confirm the following problem? when i do > >dos> rcmd rd2dvi --pdf my-package-name > >i get > >dos> Can't open perl script "c:\PROGRA~1\r\rw1091/bin/rd2dvi": No such file or >directory No, the p

R-help or R-devel [was "Re: [R] adding option ..."]

2004-07-16 Thread Martin Maechler
> "AndyL" == Liaw, Andy <[EMAIL PROTECTED]> > on Thu, 15 Jul 2004 16:18:43 -0400 writes: AndyL> [Not sure if such wishlist item should go to R-help or R-devel...] to R-devel {next time ..} Note that the posting guide (at the very end of this message) has been updated recently n

Re: [R] rd2dvi bug on windoze?

2004-07-16 Thread Uwe Ligges
Hiroyuki Kawakatsu wrote: hi, can anyone confirm the following problem? when i do dos> rcmd rd2dvi --pdf my-package-name a) It's not "dos>", but the Windows command shell. b) It's called Windows, not windoze c) The script is called Rd2dvi.sh and in this case the command name (Rd2dvi) is case sensi

Re: [R] rd2dvi bug on windoze?

2004-07-16 Thread Rolf Turner
Uwe Ligges wrote: > b) It's called Windows, not windoze No!!! It's definitely Windoze!!! cheers, Rolf Turner [EMAIL PROTECTED] __

[R] postscript plotting to 36" roll plotter

2004-07-16 Thread Don Isgitt
Hello, First, my thanks to the R developers; it is a wonderful tool and supports my development and production activities in many helpful ways. My problem is as follows: I want to make long (~ 20-30 feet) plots on a HP 755 (36" color roll plotter) using the R postscript command. I have tried pa

[R] median filter

2004-07-16 Thread Hanneke Schuurmans
Dear R users, Does anyone know if there's a median filter available in R? I have a considerable amount of images as 256 by 256 matrices and want to smooth them with a 5x5 median filter. Until now I'm not lucky in searching the R-help list/files. Thanks, Hanneke ir. J.M. (Hanneke) Schuurmans (

RE: [R] Permutations (summary)

2004-07-16 Thread Jordi Altirriba Gutiérrez
Dear R users, This is a second summary of the permutation problem I previously posted. This summary restates the problem as well as the solution. First of all thanks to everyone including Erich, Robin, Gabor, Christian, Ingmar and others for your suggestions. With the help of an off-list discus

RE: [R] median filter

2004-07-16 Thread Liaw, Andy
None that I'm aware of, but I believe there are C and Fortran codes floating around on the 'Net that you can try to link to R. Andy > From: Hanneke Schuurmans > > Dear R users, > > Does anyone know if there's a median filter available in R? > I have a considerable amount of images as 256 by 256

[R] specifying a function in nls

2004-07-16 Thread Bill Shipley
Hello. I am trying to understand the syntax of the nonlinear least squares function (nls) when the function definition is made outside of the call. Here is the context. 1. If I specify the following command, it works fine: > fit2<-nls( + A~Am*(1-exp(-alpha*(I-LCP))),data=dat1, + start

Re: [R] specifying a function in nls

2004-07-16 Thread Sundar Dorai-Raj
Bill Shipley wrote: Hello. I am trying to understand the syntax of the nonlinear least squares function (nls) when the function definition is made outside of the call. Here is the context. 1. If I specify the following command, it works fine: fit2<-nls( + A~Am*(1-exp(-alpha*(I-LCP))),d

[R] still problems with predict!

2004-07-16 Thread Anne
Hi all, I still have problems with the predict function by setting up the values on which I want to predict ie: original df: p1 (193 obs) variates y x1 x2 rm(list=ls()) x1<-rnorm(193) x2<-runif(193,-5,5) y<-rnorm(193)+x1+x2 p1<-as.data.frame(cbind(y,x1,x2)) p1 y x1 x

RE: [R] Functions in a package not visible to a user

2004-07-16 Thread Paul Roebuck
On Thu, 15 Jul 2004, Andy Liaw wrote: > Rui Dantas wrote: > > > I have a package with several R functions. Some are internal auxiliary > > functions, and should not be available to the user (nor do they, for > > example, need "user" documentation). How can I hide them? > > That's one of the purpos

[R] strucchange: breakpoints in inequally spaced data

2004-07-16 Thread Thomas Petzoldt
Hello, we want to identify breakpoints (different phases) in environmental data, algae cell counts of three years with intervals between 7 and 30 days (N=40). We found that breakpoints(cells ~1) works great and identifies 5 very good breaks, however we are uncertain about these, because the dat

Re: [R] still problems with predict!

2004-07-16 Thread Sundar Dorai-Raj
Anne wrote: Hi all, I still have problems with the predict function by setting up the values on which I want to predict ie: original df: p1 (193 obs) variates y x1 x2 rm(list=ls()) x1<-rnorm(193) x2<-runif(193,-5,5) y<-rnorm(193)+x1+x2 p1<-as.data.frame(cbind(y,x1,x2)) p1 y x1

Re: [R] still problems with predict!

2004-07-16 Thread Uwe Ligges
Anne wrote: Hi all, I still have problems with the predict function by setting up the values on which I want to predict ie: original df: p1 (193 obs) variates y x1 x2 rm(list=ls()) x1<-rnorm(193) x2<-runif(193,-5,5) y<-rnorm(193)+x1+x2 p1<-as.data.frame(cbind(y,x1,x2)) p1 y x1

[R] any package can do such job?

2004-07-16 Thread ronggui
any one know any packages can do the job describe in Michael E. Sobel's artical NEARAND LOG-NONLINEAR MODELS FOR ORDINALSCALES WITH MIDPOINTS, WITHAN APPLICATION TO PUBLIC OPINION DATA .it is said that "A set of S Plus instructions to fit the models described in Section 3 of this paper is

RE: [R] still problems with predict!

2004-07-16 Thread Liaw, Andy
One thing to etch into your brain: Don't use constructs like lm(p1$y~p1$x1+p1$x2) Instead, use: lm(y ~ x1 + x2, data=p1) Doing the former is only asking for trouble when it comes time to do prediction. It will look for `p1$y' in the newdata, and of course, won't find it there! Andy > F

[R] rpart and TREE, can be the same?

2004-07-16 Thread WWei
Hi, all, I am wondering if it is possible to set parameters of 'rpart' and 'tree' such that they will produce the exact same tree? Thanks. Auston Wei Statistical Analyst Department of Biostatistics and Applied Mathematics The University of Texas MD Anderson Cancer Center Tel: 713-563-4281 Email:

[R] specifying a complex function in nls

2004-07-16 Thread Bill Shipley
Earlier, I posted a question concerning the syntax of nls() when the nonlinear function within the call is specified outside of nls(). Sundar showed me how to do this. Now I have a slightly more complex problem that is analogous to a broken-stick regression but in a non-linear context. I want

RE: [R] rpart and TREE, can be the same?

2004-07-16 Thread Liaw, Andy
I guess if you define the splitting criterion in rpart so that it matches the one used in tree(), that's possible. However, I believe the two also differ in how they handle NAs. Andy > From: [EMAIL PROTECTED] > > Hi, all, > > I am wondering if it is possible to set parameters of 'rpart' > an

[R] Install R on AIX 5.2 64 Bit

2004-07-16 Thread Liao, Kexiao
Hi your guys, Recently, I installed R-1.9.1 on AIX 5.2 with 64 bits environment; I already have following software installed on AIX before I compile R-1.9.1 source codes: g++ 2.9.aix51.020209-4 The GNU C++ compiler and headers gcc 2.9.aix51.020209-4 The GNU gcc C compiler and headers x

[R] interpreting profiling output

2004-07-16 Thread Kasper Daniel Hansen
I have some trouble interpreting the output from profiling. I have read the help pages Rprof, summaryRprof and consult the R extensions manual, but I still have problems understanding the output. Basically the output consist of self.time and total.time. I have the understanding that total.time is

[R] plot

2004-07-16 Thread pau gonzalez
Hi! R users I want make a plot with grouping variables. Can you help me? Thanks Paula __ [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

[R] question in foreign library

2004-07-16 Thread Yongwan Chun
I got the below error message when I load my data. Can anybody explain the meaning of the message? > library(foreign) > test <- read.spss("c:/test.sav") Warning Message: C::/test.sav: Unrecognized record type 7, subtype 13 encountered in system file. Thanks in advance, [[alternativ

Re: [R] Eclipse plugin for R or perhaps S-plus.

2004-07-16 Thread Valentin Todorov
Hi Richard, A couple of months ago I did some investigation but could not find anything. For some time I played with the idea to implement it myself, but I am still at nowhere. I am using WinEdt, unfortunately only on Windows. best regards, Valentin [[alternative HTML version deleted]]

Re: [R] plot

2004-07-16 Thread Sundar Dorai-Raj
pau gonzalez wrote: Hi! R users I want make a plot with grouping variables. Can you help me? Thanks Paula __ [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/

[R] for loops in Gibbs sampler

2004-07-16 Thread Yulei He
Dear all: I am using R to do multiple imputation for longitudinal data set. The Gibbs chain basically requires draw posterior distribution of model parameters, including the random effects. The multiple imputation requires several independent Gibbs chains. So my program structure is like: for (ch

[R] Strange (non-deterministic) problem with strsplit

2004-07-16 Thread hadley wickham
I'm having an odd problem with strsplit (well I think it's strplit that's causing the problem). When I run the code below as follows: str(parseFormulaMin(y +x +d ~ b +d +e| a * b)) I expect to get List of 3 $ y: chr "y+x+d" $ x: chr "b+d+e" $ g: chr "a*b" But about half the time I get List

[R] highlighting subset of point with xyplot (or Hmisc(xYplot))

2004-07-16 Thread Patrick Lorch
Hello all, I am trying to use xyplot to give a six panel plot and to highlight only points (in any panel) that meet a certain criterion. With the plot command I would do something like: plot.default(filein$Site,filein$circ.conc) points(filein$Site,filein$circ.conc,type="p", pch=ifelse(filei

[R] Random Fields

2004-07-16 Thread Michael Axelrod
I have tried to install the package RandomFields (using the packages menu) from CRAN and it fails to open the zip file. I then tried downloading the package from the author's site, but it still fails to install. Anyone had any success with this? Or am I doing something wrong. Thanks in advance

Re: [R] highlighting subset of point with xyplot (or Hmisc(xYplot))

2004-07-16 Thread Deepayan Sarkar
On Friday 16 July 2004 16:32, Patrick Lorch wrote: > Hello all, > I am trying to use xyplot to give a six panel plot and to highlight > only points (in any panel) that meet a certain criterion. With the > plot command I would do something like: > plot.default(filein$Site,filein$circ.

[R] help with tkbind.tag

2004-07-16 Thread solares
Hi, excuse me, i don´t understan how bind a tag in R, how to use the function tkbind.tag, i used them but appear an error library(tcltk) tt<-tktoplevel() editor<-tktext(tt) tkpack(editor) tkinsert(editor,"1.0","first line \n") tkinsert(editor,"2.0","Second line \n") tkinsert(editor,"3.0","Third lin

Re: [R] Stumped on methods

2004-07-16 Thread Jim Lemon
Thank you all, gentlemen. getAnywhere(), which I blush to say I have seen flash by in a few recent messages, allowed me to see the awful truth. But for the fact that it sounds like one of those gizmos in science fiction that allow one to turn up in the next galaxy, I might have twigged. Jim __

[R] sas to r

2004-07-16 Thread Greg Adkison
I would be incredibly grateful to anyone who'll help me translate some SAS code into R code. Say for example that I have a dataset named "dat1" that includes five variables: wshed, site, species, bda, and sla. I can calculate with the following SAS code the mean, CV, se, and number of observa

[R] nlm doesn't detect a gradient in my function

2004-07-16 Thread Andrew Robinson
Hi R-community, I wonder if anyone has dealt with this problem? I've written a negative log-likelihood function of 4 parameters, and I want to minimize it. It doesn't have derivative information (it actually requires running an external program). I can detect a gradient in it, e.g.: > toy.

Re: [R] sas to r

2004-07-16 Thread Don MacQueen
Here's one way... Not tested, so there maybe typos and such, but I've used this approach successfully quite a few times. It can get kind of slow if dat1 has many, many rows. The coding assumes no missing data, though that could be handled by adding the na.rm argument in apppropriate places, and

Re: [R] sas to r

2004-07-16 Thread Adaikalavan Ramasamy
On Fri, 2004-07-16 at 23:18, Greg Adkison wrote: > I would be incredibly grateful to anyone who'll help me translate some > SAS code into R code. Searching for "SAS code OR script OR translate" on http://maths.newcastle.edu.au/~rking/R/ gives a few results, one of which looks promising is http://

RE: [R] Strange (non-deterministic) problem with strsplit

2004-07-16 Thread Henrik Bengtsson
[Moving this thread to R-devel instead] I suspect your "random" results are due to a bug in gsub(). On my R v1.9.0 (Rterm and Rgui) R crashes when I do % R --vanilla > gsub(" ", "", "abb + c | a*b", perl=TRUE) Trying > gsub(" ", "", "b c + d | a * b", perl=TRUE) and I'll get NULL. With > gs