Re: [R] Evaluation of defaults in functions

2006-09-29 Thread Prof Brian Ripley
On Thu, 28 Sep 2006, hadley wickham wrote: And, to answer the specific question: Yes, R has lazy evaluation, everywhere. Arguments are always evaluated if and when they are needed. But doesn't R has a rather limited force of lazy evaluation? - you have no control over it, apart from that

Re: [R] inserting columns in the middle of a dataframe

2006-09-29 Thread Prof Brian Ripley
On Thu, 28 Sep 2006, Joe W. Byers wrote: Berton Gunter wrote: Please folks -- use indexing. myframe-myframe[,c(1,5,2,3,4)] Which begs the question: why bother rearranging the columns anyway, since one can get them used, printed, etc. in any order you wish anytime you want just by

Re: [R] Loading rgdal library

2006-09-29 Thread Roger Bivand
On Fri, 29 Sep 2006, Michael Rhead Enion wrote: I am trying to load the rgdal library in Mac OS X 10.4.7 (pismo g3 500 mhz). This is not an R-help question, rather for R-sig-mac and/or R-sig-geo. Please review the archives of those lists, plus comments on the rgdal package on the Rgeo

Re: [R] What is wrong with this input

2006-09-29 Thread Prof Brian Ripley
On Thu, 28 Sep 2006, David Kaplan wrote: I can't seem to figure out why I'm getting this error. The output is copied right off the screen. Notice how in some cases the back slash is missing. In other cases, it can't read a file that I know is there. This is rw-FAQ 2.16 and FAQ 7.8 Since

[R] RE : What is wrong with this input

2006-09-29 Thread justin bem
The syntax is hrout - read.spss(C:/Documents and Settings/David Kaplan\My Documents/Baseball/Baseball Research/hr time series paper/new time series hr paper/hrab200.sav) to specify folder use / rather than \. Sincerly. David Kaplan [EMAIL PROTECTED] a écrit : I can't

[R] problems with R and tckl/tk on Mac OS X

2006-09-29 Thread Ingo
Dear R-help team, I am trying to run R on my Intel-based Mac. I have installed R, X11 and Tcl/TK (I thought), but the GUI doesn't run. My system administrator doesn't support R and therefore, I'm a little helpless. What can I do? Regards, Ingo

Re: [R] What is wrong with this input

2006-09-29 Thread Petr Pikal
Hi From Faq 7.8 How do file names work in Windows? As R uses C-style string handling, \ is treated as an escape character, so that for example one can enter a newline as \n. When you really need a \, you have to escape it with another \. Thus, in filenames use something like

[R] Automatical download of needed packages from CRAN

2006-09-29 Thread Søren Højsgaard
I write a package foo which requires a package bar (from CRAN) to work. So in the DESCRIPTION file I write Depends: bar. I would like it to be so that when one installs foo, then it is automatically checked whether bar is installed, and if not then bar is also installed at the same time. I

Re: [R] Display figures within pareto chart

2006-09-29 Thread Petr Pikal
Hi why did not you do it? On 29 Sep 2006 at 7:04, Torsten Mathies wrote: From: Torsten Mathies [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Date sent: Fri, 29 Sep 2006 07:04:31 +0200 Subject:[R] Display figures within pareto

Re: [R] help on plots

2006-09-29 Thread Petr Pikal
Hi what is wrong with legend. How did you fail to add a legend legend(2000, 0.8, legend=names(a)[2:5], pch=c(19,20,15,18), col=c(1,2,4,3)) works for me om Marc's example. HTH Petr On 29 Sep 2006 at 9:11, zhijie zhang wrote: Date sent: Fri, 29 Sep 2006 09:11:02 +0800 From:

Re: [R] Automatical download of needed packages from CRAN

2006-09-29 Thread Prof Brian Ripley
On Fri, 29 Sep 2006, Søren Højsgaard wrote: I write a package foo which requires a package bar (from CRAN) to work. So in the DESCRIPTION file I write Depends: bar. I would like it to be so that when one installs foo, then it is automatically checked whether bar is installed, and if not then

Re: [R] working with summarized data

2006-09-29 Thread Anupam Tyagi
Hi Rick, I came across your posting that I had replied to. I had assumed from your posting that you had positive integer weights, and that you had a certain kind of stratified sampling. For a general case, you may want to look at survey package. Graphical representation of survey data,

Re: [R] working with summarized data

2006-09-29 Thread Anupam Tyagi
Thomas Lumley tlumley at u.washington.edu writes: On Wed, 30 Aug 2006, Rick Bischoff wrote: Unfortunately, it seems that most(all?) of R's graphics and summary statistic functions don't take a weight or frequency argument. (Fortunately the models do...) I have been been meaning to

Re: [R] Automatical download of needed packages from CRAN

2006-09-29 Thread Antonio, Fabio Di Narzo
install.packages(foo, dep=Depends) See online help. I think that the GUI version of install.packages automatically does that. Antonio. 2006/9/29, Søren Højsgaard [EMAIL PROTECTED]: I write a package foo which requires a package bar (from CRAN) to work. So in the DESCRIPTION file I write

Re: [R] Evaluation of defaults in functions

2006-09-29 Thread Duncan Murdoch
On 9/28/2006 10:34 PM, hadley wickham wrote: And, to answer the specific question: Yes, R has lazy evaluation, everywhere. Arguments are always evaluated if and when they are needed. But doesn't R has a rather limited force of lazy evaluation? - you have no control over it, apart from that

Re: [R] PDE

2006-09-29 Thread Christophe Nguyen
Dear Ravi, Many thanks for your help. I guess the PDE I am interested in is parabolic: it is a diffusion+advection equation: dc/dt=D d2c/dx2 + vdc/dx Do you mean that I have to solve D d2c/dx2 + vdc/dx=0 for each time step, taking as initial condition at step n+1 the value of c at step n? Does

Re: [R] complex plots using layout()

2006-09-29 Thread Uwe Ligges
Lu, Jiang Jane wrote: Dear r-help, I am trying to plot several scatter plots with marginal histograms on one page. Ideally, a page is equally divided into 4 figure regions. Within each figure region, a scatter plot with marginal histograms will be plotted. I followed Dr. Paul Murrell's

[R] Build error on Windows

2006-09-29 Thread Pankaj Savdekar
Hi, I'm trying to build R-2.3.1 on windows, but make gives me following error while building pkg-base: -- Making package base adding build stamp to DESCRIPTION make[4]: *** [frontmatter] Error 1 make[3]: *** [all] Error 2 make[2]: *** [pkg-base] Error 2 make[1]: ***

Re: [R] PDE

2006-09-29 Thread Ravi Varadhan
No, you don't solve D d2c/dx2 + v dc/dx = 0. You discretize the spatial derivatives using finite differences (typically, central difference), at a given time. Let us say x goes from 0 to 1. Divide this into intervals of length delta x, such that x(i+1) = x (i) + delta x, i = 0, ..., N-1. Let

Re: [R] problems with R and tckl/tk on Mac OS X

2006-09-29 Thread Alex Brown
I assume you are running MacOS X 10.4? The Mac version of R does not require X11 or Tcl/TK since it uses a separate GUI interface developed exclusively for the Mac using native widgets and a quartz based graphing mechanism. Try downloading the following binary installer which includes the

Re: [R] Evaluation of defaults in functions

2006-09-29 Thread hadley wickham
But doesn't R has a rather limited force of lazy evaluation? - you have no control over it, apart from that arguments are evaluated lazily. This rather limited compared to other languages (no lazy lists etc) You do have more control than that. You can't put a promise in a list, but

Re: [R] Evaluation of defaults in functions

2006-09-29 Thread Gabor Grothendieck
On 9/29/06, hadley wickham [EMAIL PROTECTED] wrote: But doesn't R has a rather limited force of lazy evaluation? - you have no control over it, apart from that arguments are evaluated lazily. This rather limited compared to other languages (no lazy lists etc) You do have more

Re: [R] Evaluation of defaults in functions

2006-09-29 Thread Duncan Murdoch
On 9/29/2006 10:12 AM, hadley wickham wrote: But doesn't R has a rather limited force of lazy evaluation? - you have no control over it, apart from that arguments are evaluated lazily. This rather limited compared to other languages (no lazy lists etc) You do have more control than

Re: [R] Build error on Windows

2006-09-29 Thread Duncan Murdoch
On 9/29/2006 8:53 AM, Pankaj Savdekar wrote: Hi, I'm trying to build R-2.3.1 on windows, but make gives me following error while building pkg-base: -- Making package base adding build stamp to DESCRIPTION make[4]: *** [frontmatter] Error 1 make[3]: *** [all] Error

Re: [R] problems with R and tckl/tk on Mac OS X

2006-09-29 Thread John Fox
Dear Alex, It's possible, though not clear from the original posting, that Ingo is trying to install the Rcmdr package. If that's the case, then he might find the installation instructions for Mac users at http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html helpful.

Re: [R] Evaluation of defaults in functions

2006-09-29 Thread Luke Tierney
On Fri, 29 Sep 2006, Prof Brian Ripley wrote: On Thu, 28 Sep 2006, hadley wickham wrote: And, to answer the specific question: Yes, R has lazy evaluation, everywhere. Arguments are always evaluated if and when they are needed. But doesn't R has a rather limited force of lazy evaluation?

Re: [R] plotting all subgroups with augPred

2006-09-29 Thread Spencer Graves
You want an 'augPred' plot with multiple lines per panel, from multiple factors in the model? Because you provided such a simple, self-contained example, I can offer much more substantive comments than I might have otherwise. First the bad news: I don't see an easy way to get what you

Re: [R] Evaluation of defaults in functions

2006-09-29 Thread hadley wickham
There are not all that many other languages that use lazy evaluation. Those that do are for the most part pure or nearly pure functional languages--Haskell is probably the main example. These go much further in their use of lazy evaluation than R. For analogs of the R expressions

Re: [R] EBAM ERROR

2006-09-29 Thread Spencer Graves
I haven't seen a reply to this post, so I will offer a couple of comments. Unfortunately, the information provided is not sufficient for me to answer your questions. If you'd still like help from this listserve, please provide commented, minimal, self-contained, reproducible code, as

Re: [R] problems with R and tckl/tk on Mac OS X

2006-09-29 Thread Rob J Goedman
Hi John, Alex and Ingo, Thanks for catching this question. I'd missed Ingo's original email. Rcmdr does need X.11 and Tcl/Tk, although it uses the versions that come with Mac OS 10.4. Hence, as Alex indicates, there is no need to separately install these. Ingo, if you can't get it to work

Re: [R] Evaluation of defaults in functions

2006-09-29 Thread Luke Tierney
On Fri, 29 Sep 2006, hadley wickham wrote: There are not all that many other languages that use lazy evaluation. Those that do are for the most part pure or nearly pure functional languages--Haskell is probably the main example. These go much further in their use of lazy evaluation than R.

[R] hcc not found, rcmd build

2006-09-29 Thread Patrick Giraudoux
Working under Windows XP, I am compiling a package called 'pgirmess' with the command rcmd build --binary --auto-zip pgirmess I have this message error after having listed: functions text html latex example chm zipping help file hcc: not found cp: cannot stat

Re: [R] hcc not found, rcmd build

2006-09-29 Thread Uwe Ligges
Patrick Giraudoux wrote: Working under Windows XP, I am compiling a package called 'pgirmess' with the command rcmd build --binary --auto-zip pgirmess I have this message error after having listed: functions text html latex example chm zipping help file hcc: not found cp:

[R] List-manipulation

2006-09-29 Thread Benjamin Otto
Hi, Sorry for the question, I know it should be basic knowledge but I'm struggling for two hours now. How do I select only the first entry of each list member and ignore the rest? So for $121_at -113691170 $1255_g_at 42231151 $1316_at 35472685 35472588

[R] Helmert contrasts for repeated measures and split-plot expts

2006-09-29 Thread Roy Sanderson
Dear R-help I have two separate experiments, one a repeated-measures design, the other a split-plot. In a standard ANOVA I have usually undertaken a multiple-comparison test on a significant factor with e.g TukeyHSD, but as I understand it such a test is inappropriate for repeated measures or

[R] File Encoding Warnings during package installs

2006-09-29 Thread Sarosh Jamal
I've been getting the following warning on each package update/install (Rv2.4 on SunOS9): Warning message: 'DESCRIPTION' file has 'Encoding' field and re-encoding is not possible. This was the case on R2.3 and now on R2.4 as well - any insight would be much appreciated. Thank you, Sarosh

Re: [R] List-manipulation

2006-09-29 Thread jim holtman
Is this what you want? x - list(a=1:3, b=30:34, c=40:35) x $a [1] 1 2 3 $b [1] 30 31 32 33 34 $c [1] 40 39 38 37 36 35 lapply(x,'[', 1) $a [1] 1 $b [1] 30 $c [1] 40 unlist(lapply(x,'[', 1)) a b c 1 30 40 On 9/29/06, Benjamin Otto [EMAIL PROTECTED] wrote: Hi, Sorry for the

Re: [R] hcc not found, rcmd build

2006-09-29 Thread Roger Bivand
On Fri, 29 Sep 2006, Patrick Giraudoux wrote: Working under Windows XP, I am compiling a package called 'pgirmess' with the command rcmd build --binary --auto-zip pgirmess I have this message error after having listed: functions text html latex example chm zipping help file

Re: [R] hcc not found, rcmd build

2006-09-29 Thread Patrick Giraudoux
Exactly that... Shame on me, ashes on my head and all those sort of things... Thanks for the hint anyway... Patrick Uwe Ligges a écrit : Patrick Giraudoux wrote: Working under Windows XP, I am compiling a package called 'pgirmess' with the command rcmd build --binary --auto-zip

Re: [R] Formula aruguments with NLS and model.frame()

2006-09-29 Thread Spencer Graves
I haven't seen any replies to this post, so I will offer a couple of comments. First, your example is entirely too complicated and not self contained for me to say much in the limited time I have for this. I suggest you start by splitting your problem into several steps. For

[R] RODBC ERROR on Rcmdr install

2006-09-29 Thread Sarosh Jamal
I've been trying to install the RODBC dependency for Rcmdr on Rv2.4 on a SunOS9 system. It claims not to be able to create gcc output files (executables) for the installation. This is puzzling since I've been able to install other packages with the same PATH variables and all. Feedback

Re: [R] time series simulation

2006-09-29 Thread Spencer Graves
First, I'd write down a model for how your stochastic process relates to independent, normal observations with mean 0 and standard deviation 1. You want a lognormal series, so I'd start by generating a normal series and the compute 'exp' of that. If you'd like more help from this

Re: [R] List-manipulation

2006-09-29 Thread Richard M. Heiberger
You need one of the apply family of functions. ?sapply tmp - list(a=1:2, b=3:5, c=5, dd=numeric(0), e=1:8) sapply(tmp, function(x) x[1]) a b c dd e 1 3 5 NA 1 __ R-help@stat.math.ethz.ch mailing list

Re: [R] List-manipulation

2006-09-29 Thread Tony Plate
Does this do what you want? x - list(1,2,3:7,8,9:10) sapply(x, function(xx) xx[1]) [1] 1 2 3 8 9 -- Tony Plate Benjamin Otto wrote: Hi, Sorry for the question, I know it should be basic knowledge but I'm struggling for two hours now. How do I select only the first entry

[R] Heteroskedasticity test

2006-09-29 Thread Alberto Monteiro
Is there any heteroskedasticity test in the package? Something that would flag a sample like x - c(rnorm(1000), rnorm(1000, 0, 1.2)) Alberto Monteiro __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] X-axis labels in histograms drawn by the truehist function

2006-09-29 Thread Ravi Varadhan
Hi, I have a simple problem that I would appreciate getting some tips. I am using the truehist function within an apply call to plot multiple histograms. I can't figure out how to get truehist to use the column names of the matrix as the labels for the x-axis of the histograms. Here is

Re: [R] Simulation of a Dirichlet Process.

2006-09-29 Thread Spencer Graves
I haven't seen any replies to this post, and I don't know tutors in NYC. However, I just got 79 hits for 'RSiteSearch(dirichlet)' and 12 for 'RSiteSearch(dirichlet MCMC)'. If you would like further help from this listserve, I suggest you review the results of 'RSiteSearch(dirichlet

[R] GLM information matrix

2006-09-29 Thread Bickel, David
Is there a function that provides the Fisher information matrix for a generalized linear model? I do not see how to access the off-diagonal matrix elements of the value returned by glm. (I'm particularly interested in logistic regression.) If not, what is a good way to use R to compute Hessians

Re: [R] Heteroskedasticity test

2006-09-29 Thread Richard M. Heiberger
The Brown-Forsyth test for homogeneity of variance is included in the HH package, downloadable from CRAN. library(HH) x - c(rnorm(1000), rnorm(1000, 0, 1.2)) tmp - data.frame(x=x, group=rep(c(s1,s1.2), c(1000,1000))) plot.hov(x ~ group, data=tmp) hov(x ~ group, data=tmp)

[R] attributable fraction

2006-09-29 Thread Antonio_Paredes
Hello everyone. I wanted to ask if there is an R function to estimates (confidence intervals) attributable fraction (vaccine efficacy) from a binomial model with a predictor with more than two levels (vaccinates, controls, other). Thank you very much. [[alternative HTML version

[R] Plotting text with lattice

2006-09-29 Thread McGehee, Robert
Hello, I've decided to take the leap and try my hand at the lattice package, though I am getting stuck at what one might consider a trivial problem, plotting text at a point in a graph. Apologies in advance if (that) I'm missing something extremely basic. Consider in base graphics: plot(1:10)

[R] linear gradient in nls

2006-09-29 Thread H. Paul Benton
Hello, I hope this doesn't turn into a statistics question but here I go. I am using the nls function with a Gaussian distribution, see coding below. When I run the nls I get an error back saying that I have a linear gradient. I then, of course am unable to do anything else. The

Re: [R] GLM information matrix

2006-09-29 Thread Charles Annis, P.E.
David: I don't have what you want. But if your model is simple (2-parameter, binomial response, glm with a logit link) I have some code that computes and plots the loglikelihood surface using contour() and superimposes the asymptotic 95% confidence ellipse, for comparison with the observed

Re: [R] ISO8601 week-of-year to date

2006-09-29 Thread Spencer Graves
What have you tried? Are you familiar with the 'zoo' vignette and the time-date articles in R News? Have you tried 'RSiteSearch'? If you'd like more help from this listserve, please submit another post that includes commented, minimal, self-contained, reproducible code

Re: [R] GLM information matrix

2006-09-29 Thread Dimitrios Rizopoulos
look at summary.glm(), probably you're looking for fit - glm(..., family = binomial) # the inverse Fisher Information matrix summary(fit)$cov.scaled I hope it helps. Best, Dimitris -- Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of

Re: [R] GLM information matrix

2006-09-29 Thread Ravi Varadhan
David, You can use the 'vcov' function in the stats package to extract the variance-covariance matrix from the GLM object. Inverse of this matrix will give you the observed (not Fisher) information matrix. You can also use the numDeriv package to obtain accurate Hessian of the log-likelihood.

Re: [R] Plotting text with lattice

2006-09-29 Thread Gabor Grothendieck
Here are two possibilities. The first use trellis.focus/trellis/unfocus to add text subsequent to drawing the xyplot and the second uses a custom panel: xyplot(x ~ x, data = data.frame(x = 1:10)) trellis.focus(panel, 1, 1) panel.text(x=2, y=4, labels=Text) trellis.unfocus() xyplot(x ~ x, data =

[R] Wilcoxon Rank test of Package Coin

2006-09-29 Thread Jue.Wang2
Hi, I am running the following example which can be found on page 12 of the pdf file of COIN package wt-wilcox_test(pd~age,data=water_transfer,distribution=exact, conf.int=TRUE) wt actually contains the estimate of difference in location and the confidence interval of it. I am just wondering

Re: [R] linear gradient in nls

2006-09-29 Thread Douglas Bates
On 9/29/06, H. Paul Benton [EMAIL PROTECTED] wrote: Hello, I hope this doesn't turn into a statistics question but here I go. I am using the nls function with a Gaussian distribution, see coding below. When I run the nls I get an error back saying that I have a linear gradient.

Re: [R] X-axis labels in histograms drawn by the truehist function

2006-09-29 Thread Gabor Grothendieck
Try this: f - function(x,xlab) truehist(x, xlab = xlab) mapply(f, as.data.frame(X), colnames(X)) On 9/29/06, Ravi Varadhan [EMAIL PROTECTED] wrote: Hi, I have a simple problem that I would appreciate getting some tips. I am using the truehist function within an apply call to plot

Re: [R] Plotting text with lattice

2006-09-29 Thread Deepayan Sarkar
On 9/29/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Here are two possibilities. The first use trellis.focus/trellis/unfocus to add text subsequent to drawing the xyplot and the second uses a custom panel: xyplot(x ~ x, data = data.frame(x = 1:10)) trellis.focus(panel, 1, 1)

[R] index vector

2006-09-29 Thread bertrand toupin
Hi! 1st time I'm posting here. I'm beginning to learn R and I've encountered a problem that I'm unable to solve so far. I have a 20 000 x 5 matrix. In the 5th column, I have elevation. Missing value are actually put to -9. I want to track down the index of those values and replace

[R] help with distance matrix

2006-09-29 Thread Deming Mi
Dear R users, I have computed a diagonal distance matrix and it's in a matrix format (I did not use the dist() function). However hclust() does not take my distance matrix as correct input object. It seems that hclust() only accept the distance matrix from dist() as input object. Does

Re: [R] a decimal aligned column

2006-09-29 Thread BBands
Many thanks to Marc Schwartz who helped me work through this problem in a series of off list exchanges. jab -- John Bollinger, CFA, CMT www.BollingerBands.com If you advance far enough, you arrive at the beginning. __ R-help@stat.math.ethz.ch

Re: [R] index vector

2006-09-29 Thread jim holtman
Is this what you want? x - matrix(1:25,5) x[c(2,5),5] - - x [,1] [,2] [,3] [,4] [,5] [1,]16 11 1621 [2,]27 12 17 - [3,]38 13 1823 [4,]49 14 1924 [5,]5 10 15 20 - x[x[,5] == -, 5] - NA x [,1] [,2]

Re: [R] index vector

2006-09-29 Thread Marc Schwartz (via MN)
On Fri, 2006-09-29 at 16:13 -0400, bertrand toupin wrote: Hi! 1st time I'm posting here. I'm beginning to learn R and I've encountered a problem that I'm unable to solve so far. I have a 20 000 x 5 matrix. In the 5th column, I have elevation. Missing value are actually put to -9. I

Re: [R] index vector

2006-09-29 Thread bertrand toupin
yes, exactly! Thanks a lot for your quick answer :) jim holtman [EMAIL PROTECTED] wrote: Is this what you want? x - matrix(1:25,5) x[c(2,5),5] - - x [,1] [,2] [,3] [,4] [,5] [1,]16 11 1621 [2,]27 12 17 - [3,]38 13 1823 [4,]49

Re: [R] index vector

2006-09-29 Thread bertrand toupin
Thanks to you also. This is very informative and it helps me with some basics R function :) Marc Schwartz (via MN) [EMAIL PROTECTED] wrote: On Fri, 2006-09-29 at 16:13 -0400, bertrand toupin wrote: Hi! 1st time I'm posting here. I'm beginning to learn R and I've encountered a problem that

[R] Confidence interval in the Wilcoxon exact test

2006-09-29 Thread Jue.Wang2
Hi, Two functions wilcox.exact and wilcox_test give slightly different confidence intervals of the difference of the medians: for example y-c(0,0,1.081,0.594,0,0.769,0,0.009,0,0,0.798,0.405,0.498,0.946,1.35,1.149,0.528) x-c(rep(1,10),rep(2,7)) aa-wilcox.exact(y~x,conf.int=TRUE)

Re: [R] Build error on Windows

2006-09-29 Thread Pankaj Savdekar
Thanks for the quick reply. On 9/29/2006 8:53 AM, Pankaj Savdekar wrote: Hi, I'm trying to build R-2.3.1 on windows, but make gives me following error while building pkg-base: -- Making package base adding build stamp to DESCRIPTION make[4]: *** [frontmatter] Error 1

[R] Using censummary on censored data

2006-09-29 Thread ed_kowal
Hi Forum, i am reading a csv file and running the command censummary for a summary statistics on a censored dataset... the output in the console looks like, but with an errror message in the end :( censtat - read.csv(C:/Documents and Settings/ed/Desktop/Project-Datasets/pyrene.csv, header =

Re: [R] Confidence interval in the Wilcoxon exact test

2006-09-29 Thread Thomas Lumley
On Fri, 29 Sep 2006, [EMAIL PROTECTED] wrote: Hi, Two functions wilcox.exact and wilcox_test give slightly different confidence intervals of the difference of the medians: for example y-c(0,0,1.081,0.594,0,0.769,0,0.009,0,0,0.798,0.405,0.498,0.946,1.35,1.149,0.528) x-c(rep(1,10),rep(2,7))

[R] scatter3d() model.summary coefficients?

2006-09-29 Thread angela baldo
Hello All, I am a R newbie and am probably misinterpreting something really obvious... In the Rcmdr package there is a scatter3d() function that can fit a curve and also provide coefficients for the model. If I'm understanding this right, I think it's calling the lower level stats package

[R] scatter3d() model.summary coefficients?

2006-09-29 Thread angela baldo
Hello All, I am a R newbie and am probably misinterpreting something really obvious... In the Rcmdr package there is a scatter3d() function that can fit a curve and also provide coefficients for the model. If I'm understanding this right, I think it's calling the lower level stats package

Re: [R] scatter3d() model.summary coefficients?

2006-09-29 Thread John Fox
Dear Anja, As you suggest, models in scatter3d() are fit via lm() and also mgcv(). scatter3d() rescales the three variables to fit in the unit cube; I believe that the new version of rgl makes the rescaling unnecessary, so eventually I'll probably rework scatter3d() to avoid it. It would be

[R] if then else

2006-09-29 Thread Jue.Wang2
What is the correct form to write statement meaning: if (a==1) {b=2; c=3}; else {b=0; c=0}; Thank you Jue Wang, Biostatistician Contracted Position for Preclinical Research Biostatistics PrO Unlimited (908) 231-3022 __ R-help@stat.math.ethz.ch

Re: [R] RODBC ERROR on Rcmdr install

2006-09-29 Thread John Fox
Dear Sarosh, As I understand it, RODBC isn't useful on non-Windows systems, since the necessary ODBC drivers aren't available. (Someone will correct me, I'm sure, if I don't have that entirely straight.) The RODBC package is used in the Rcmdr to read Excel and some other files under Windows; in

Re: [R] help with distance matrix

2006-09-29 Thread Gabor Grothendieck
Try: as.dist(mymatrix) On 9/29/06, Deming Mi [EMAIL PROTECTED] wrote: Dear R users, I have computed a diagonal distance matrix and it's in a matrix format (I did not use the dist() function). However hclust() does not take my distance matrix as correct input object. It seems that hclust()

Re: [R] Formula aruguments with NLS and model.frame()

2006-09-29 Thread Joe Byers
Spencer, Thank you for taking time to reply and offer suggestions. garchFit does not allow 'formula.mean=~z+arma(p, q)', nor does it allow xreg=(x,y) options. Any thing is xreg is ignored with a warming or error. I have debugged garchFit and I know where the code should be modified to

Re: [R] if then else

2006-09-29 Thread Ferdinand Alimadhi
a-1 if ( a ==1 ){ b - 2 c - 3 } else { b - 0 c - 0 } [EMAIL PROTECTED] wrote: What is the correct form to write statement meaning: if (a==1) {b=2; c=3}; else {b=0; c=0}; Thank you Jue Wang, Biostatistician Contracted Position for Preclinical Research Biostatistics PrO Unlimited

[R] R 2.3.1 and SPSS 14.0

2006-09-29 Thread David Kaplan
Hi, Are there any incompatibilities with R 2.3.1 and SPSS 14.0 with regard to the read.spss command? Thanks in advance. David -- David Kaplan, Ph.D. Professor Department of Educational Psychology University of

[R] Simple graphics

2006-09-29 Thread Alberto Vieira Ferreira Monteiro
Is there any way that I can do something like this: png(file.png, width=200, height=200) polygon(c(50, 50, 150, 150), c(50, 150, 150, 50)) dev.off() and then have a png file with a 100 x 100 pixels rectangle in the middle of it? It seems that when I call plot, it redefines the image

Re: [R] Simple graphics

2006-09-29 Thread jim holtman
Is this what you want? You have to reset the margins: png(file.png, width=200, height=200) par(mar=c(0,0,0,0)) # reset margins plot(0, xlim=c(0,200), ylim=c(0,200), type='n') polygon(c(50, 50, 150, 150), c(50, 150, 150, 50)) dev.off() On 9/29/06, Alberto Vieira Ferreira Monteiro [EMAIL

Re: [R] strange warning message

2006-09-29 Thread Tong Wang
Hi Duncan: Thank you for your help last time, since I do not use NULL to indicate empty enviroment, I think I'm fine. And yes, I did upgrade my R version recently, but how comes I still get this warning for new files created and saved after that update ? Is there anyway to get rid of