Re: [R] on.exit() inside local()

2004-08-10 Thread Gabor Grothendieck
Vadim Ogranovich vograno at evafunds.com writes: : : Hi, : : Since I routinely open files in a loop I've developed a habit of using : on.exit() to close them. Since on.exit() needs to be called within a : function I use eval() as a surrogate. For example: : : for (fileName in c(a, b)) eval({ :

Re: [R] How to import specific column(s) using read.table?

2004-08-10 Thread Gabor Grothendieck
Gabor Grothendieck ggrothendieck at myway.com writes: : : F Duan f.duan at yale.edu writes: : : I have a very big tab-delim txt file with header and I only want to import : several columns into R. I checked the options for read.table and only : : Try using scan with the what=list(...) and

[R] date axes and formats in levelplot

2004-08-10 Thread Toby.Patterson
Hi all (and particularly Deepayan), A while back Deepayan helped me with the query in the text below (thanks again). Specifically it was about changing the way that dates plotted on the axes of lattice plots. While this works using xyplot, everything comes apart when I use levelplot. The axis

AW: AW: [R] built-in Sweave-like documentation in R-2.x

2004-08-10 Thread Khamenia, Valery
Is selecting and 'C-c C-r'-ing the 3 chunks separately that bad? Yes. The UI should take care of it for him. right. Others may have better suggestions. A bit more work on the chunk evaluation approach within Emacs is one; it almost does what is needed, but not quite. why almost,

[R] Using R boxplot function in Excel

2004-08-10 Thread Vito Ricci
Hi, I tried to create boxplot in Excel using Rcom (ver. 1.0) and it works correctly. Explain better A,B,C: are three samples? groups? do you want a boxplot using A,B,C for grouping? Maybe there are corrupted files in Rcom installation, re-install Rcom. Best Vito Hi, I have downloaded the

[R] Using R boxplot function in Excel

2004-08-10 Thread Vito Ricci
Hi, there is a mailing list about R Com, if you still have problems write to that list. See: http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l Best Vito Hi, I have downloaded the R-Com and I was able to run Interactive Graphics Demo 2 in excel. However, I couldn't create my own

AW: [R] built-in Sweave-like documentation in R-2.x

2004-08-10 Thread Khamenia, Valery
hi tony, What exactly do you mean by this? 1. generation of Sweave-style docs from R programs or interaction? neither (if i correctly interpret your question). 2. tools for doing docs and analysis at the same time? Emacs Speaks Statistics has supported this with R since last century

[R] RSPerl on Redhat 9 (i386 box) and R-1.9.1

2004-08-10 Thread Manoj - Hachibushu Capital
Hi, Sorry for the open-ended nature of the question but was *anyone* able to successfully install RSPerl(version 0.5-7) on Redhat 9, i386 box for the latest R version (1.9.1)? I tried far too many things to make it work but am unable to get it working for any case (R

Re: [R] linear constraint optim with bounds/reparametrization

2004-08-10 Thread Ingmar Visser
On 8/9/04 4:52 PM, Thomas Lumley [EMAIL PROTECTED] wrote: On Mon, 9 Aug 2004, Kahra Hannu wrote: 1) constrOptim does not work in this case because it only fits inequality constraints, ie A%*%theta = c --- I was struggling with the same problem a few weeks ago in

[R] two-way ANOVA

2004-08-10 Thread Luis Rideau Cruz
R-help This is more a statistic thing than an R question. I have length measurements of organisms which I want to use for an two-way ANOVA( fixed factors) The problem is that I have different number of replicates for each combination of factors. What are the strengths and weakness of these

Re: [R] linear constraint optim with bounds/reparametrization

2004-08-10 Thread Spencer Graves
If A%*%thetac, then log(c-A%*%theta) returns NA. if A%*%thetac, log(A%*%theta-c) returns NA. Only when A%*%theta==c do you get a number from log(A%*%theta-c), and that's (-Inf). However, for an equality constraint, I've had good luck by with an objective function that adds something

[R] Help with Normal Range Estimation for repated measures

2004-08-10 Thread Crabb, David
I would be grateful if members of the list could point me in the direction of any code (preferably in R) that will allow me to estimate 95th percentiles from a set of repeated measurements. For example, we are interested in a clinical measurement where we have 3 measures for 14 subjects and 2

Re: [R] Easy acf and pacf for irregular time series in R

2004-08-10 Thread Adrian Trapletti
R: Is there an easy way to get the acf and pacf for an irregular times series? That is, the acf and pacf with lag lengths that are in units of time, not observation number. There are several solutions available depending on the particular problem, some of them statistically cleaner than

RE: [R] R packages install problems linux - X not found (WhiteBoxEL 3)

2004-08-10 Thread Dr Mike Waters
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Schwartz Sent: 09 August 2004 15:13 To: Dr Mike Waters Cc: R-Help Subject: RE: [R] R packages install problems linux - X not found (WhiteBoxEL 3) On Mon, 2004-08-09 at 08:13, Dr Mike

Re: AW: [R] built-in Sweave-like documentation in R-2.x

2004-08-10 Thread A.J. Rossini
Khamenia, Valery [EMAIL PROTECTED] writes: I think just smarter C-c C-r would be kind of trade-off here. hm, maybe there are some other voices here similar to mine? It would be easier to discuss the subj. Within ESS, you've got the ess-thread-eval (similar to ess-chunk-eval), so the guts

[R] Re: date axes and formats in levelplot

2004-08-10 Thread Deepayan Sarkar
On Tuesday 10 August 2004 01:34, [EMAIL PROTECTED] wrote: Hi all (and particularly Deepayan), A while back Deepayan helped me with the query in the text below (thanks again). Specifically it was about changing the way that dates plotted on the axes of lattice plots. While this works using

RE: [R] R packages install problems linux - X not found (WhiteBoxEL 3)

2004-08-10 Thread Marc Schwartz
On Tue, 2004-08-10 at 08:15, Dr Mike Waters wrote: snip From unpacking the tarball and running ./configure in the R source directory, I obtain the fact that crti.o is needed by ld.so and was not found. This file is not present on the system. This file, along with crtn.o is usually installed

[R] Approaches to using RUnit

2004-08-10 Thread Klaus Juenemann
Hi Seth, first of all note that it was a deliberate decision to leave it up to the RUnit user to load all the functions and packages to be tested because loading and sourcing is always very site-specific. RUnit just assumes that all functionality to be tested is already present in the R

[R] Re: Enduring LME confusion or Psychologists and Mixed-Effects

2004-08-10 Thread Christophe Pallier
Hello, Suppose I have a typical psychological experiment that is a within-subjects design with multiple crossed variables and a continuous response variable. Subjects are considered a random effect. So I could model aov1 - aov(resp~fact1*fact2+Error(subj/(fact1*fact2)) However, this only

[R] persp, array and colors

2004-08-10 Thread Camarda, Carlo Giovanni
Dear R-users, I'd like to plot a three-dimensional surface and at the meantime I'm using an array. I would like to have the values of my first matrix in the heights of the plot and the colors of the single facet taking into account the second matrix. I hope that the next code will help all of you

[R] Question about mle function

2004-08-10 Thread Victoria Landsman
Dear all, I'd like to find the mle esttimates using the mle function mle(negloglik, start = list(), fixed=list(), method=...). I am using the L-BGFS-B method and I don't supply the gradient function. Is there a way to print the gradients found at the solution value? I am using R-1.9.1 on

[R] summary output for inverse Gaussian GLM

2004-08-10 Thread Edward Dick
I'm getting inconsistent output about the link function from the summary() command when fitting an inverse Gaussian GLM: summary(glm(ig.formula, family=inverse.gaussian(link = log), + data=mydata, start=start.vals))$call glm(formula = ig.formula, family = inverse.gaussian(link = log), data =

Re: [R] summary output for inverse Gaussian GLM

2004-08-10 Thread Thomas Lumley
On Tue, 10 Aug 2004, Edward Dick wrote: I'm getting inconsistent output about the link function from the summary() command when fitting an inverse Gaussian GLM: Yes, it's a bug in the name, not in the result, fortunately. The inverse.gaussian family object always has the name of the link set

Re: [R] How to import specific column(s) using read.table?

2004-08-10 Thread F Duan
Thanks a lot. Your way works perfect. And one more tiny question related to your codes: My data file has many columns to be omitted (suppose the first 20 ones), but I found scan(myfile, what=list(rep(NULL, 20), rep(0, 5)) doesn't work. I had to to type NULL 20 times and 0 five times in the

RE: [R] How to import specific column(s) using read.table?

2004-08-10 Thread Liaw, Andy
Use as.list. Andy From: F Duan Thanks a lot. Your way works perfect. And one more tiny question related to your codes: My data file has many columns to be omitted (suppose the first 20 ones), but I found scan(myfile, what=list(rep(NULL, 20), rep(0, 5)) doesn't work. I had to

[R] Error message in function mars() in package mda

2004-08-10 Thread Jude Ryan
Hi, I am using function mars() in package mda to find knots in a whole bunch of predictor variables. I hope to be able to replicate all or some of the basis functions that the MARS software from Salford Systems creates. When I ran mars() on a small dataset, I was able to get the knots.

Re: [R] How to import specific column(s) using read.table?

2004-08-10 Thread Tony Plate
At Tuesday 01:55 PM 8/10/2004, F Duan wrote: Thanks a lot. Your way works perfect. And one more tiny question related to your codes: My data file has many columns to be omitted (suppose the first 20 ones), but I found scan(myfile, what=list(rep(NULL, 20), rep(0, 5)) doesn't work. I had to to

Re: [R] Question about mle function

2004-08-10 Thread Peter Dalgaard
Victoria Landsman [EMAIL PROTECTED] writes: Dear all, I'd like to find the mle esttimates using the mle function mle(negloglik, start = list(), fixed=list(), method=...). I am using the L-BGFS-B method and I don't supply the gradient function. Is there a way to print the gradients found

Re: [R] Question about mle function

2004-08-10 Thread Prof Brian Ripley
On 10 Aug 2004, Peter Dalgaard wrote: Victoria Landsman [EMAIL PROTECTED] writes: Dear all, I'd like to find the mle esttimates using the mle function mle(negloglik, start = list(), fixed=list(), method=...). I am using the L-BGFS-B method and I don't supply the gradient

[R] hist and normal curve

2004-08-10 Thread Laura Holt
Hi R People: I have a data set and I want to use the hist command and produce a histogram. Then I want to superimpose a normal curve over the histogram. Is there a simple way to do this, please? R version 1.9.1 Windows. thanks in advance, Sincerely, Laura Holt mailto: [EMAIL PROTECTED]

[R] Polar decomposition of a rectangular matrix

2004-08-10 Thread simon gatehouse
Dear R users, Is anyone aware of an R implementation of a matrix polar decomposition? X = US. I can get it from SVD but I understand that this is inefficient when dealing with large matrices. Cheers Simon Gatehouse --- School of Biological, Earth

Re: [R] hist and normal curve

2004-08-10 Thread Sundar Dorai-Raj
Laura Holt wrote: Hi R People: I have a data set and I want to use the hist command and produce a histogram. Then I want to superimpose a normal curve over the histogram. Is there a simple way to do this, please? R version 1.9.1 Windows. thanks in advance, Sincerely, Laura Holt mailto: [EMAIL

[R] intersect two files

2004-08-10 Thread Christian Mora
Hi all; Im working with two datasets in R, say data1 and data2. Both datasets are composed of several rows and columns (dataframe) and some of the rows are identical in both datasets. Im wondering if there is any way to remove from one set, say data1, the rows that are identical in the other set,

RE: [R] intersect two files

2004-08-10 Thread Liaw, Andy
You have not given enough info. Do the data sets have the same columns? If not, you need to tell us more about how you can tell whether one row of a data frame is `identical' to some row of another. Assuming the columns are the same between the two, the basic idea is to combine all columns into

Re: [R] intersect two files

2004-08-10 Thread Adaikalavan Ramasamy
In short, merge with all=FALSE followed by removal of redundant columns might do the trick. If rownames serve as common key, use the argument by=0. See http://tolstoy.newcastle.edu.au/R/help/04/07/1250.html and many other hits on http://maths.newcastle.edu.au/~rking/R/ On Tue, 2004-08-10 at

[R] str and Surv objects

2004-08-10 Thread Laura Holt
Dear R People: I used the Surv function to produce the following object: a - Surv(1:4,2:5,c(0,1,1,0)) a [1] (1,2+] (2,3 ] (3,4 ] (4,5+] str(a) Error in [.Surv(object, 1:ile) : subscript out of bounds Why does str(a) give an error, please? Or did I do something wrong? Thanks in advance. R Version

RE: [R] str and Surv objects

2004-08-10 Thread Liaw, Andy
Buried in str.default is a line: iv.len - round(2.5 * v.len) which seems to be the culprit. v.len is 4, which seems correct for the data given. Why multiply by 2.5? Andy From: Laura Holt Dear R People: I used the Surv function to produce the following object: a -

[R] Observation error in arima

2004-08-10 Thread Guiming Wang
Hi, Does anyone know how to include observation errors in the arima of R. I read the manual and tried the example codes, but did not find the solution. From the outputs of the components model, it seems to me that the default setting of the arima does not include the observational error in

RE: [R] R packages install problems linux - X not found(WhiteBoxEL 3)

2004-08-10 Thread Dr Mike Waters
Marc, Yes - the glibc-devel package was shown to be installed using rpm -qa. It is also one of the packages upgraded by up2date from the original version supplied with the WhiteBox distribution. I concluded that there were probably more such improperly/incompletely upgraded packages and cut my