Re: [R] how to run ANCOVA?

2006-08-24 Thread Richard M. Heiberger
But how is that different from just a 3-way ANOVA with age, diagnosis, and gender as the the three effects? Isn't ANCOVA a fundamentally different model? Thanks, Sasha ANCOVA is a linear model with both factors and continuous variables on the right-hand side of the model formula. In

[R] Search for best ARIMA model

2006-08-24 Thread Schweitzer, Markus
Hello, I have a several time series, which I would like to check for their best fitted Arima model (I am checking for the lowest aic value). Which lets me raise two questions: 1) is there are more efficient way, than using 6 for-loops? 2) sometimes the system cannot calculate with given

Re: [R] Authoring a book

2006-08-24 Thread Tom Backer Johnsen
Jack B. Arnold wrote: Dear Tom, Looking forward to your book. Psychologists and students clearly need all the encouragement to use R that they can get. I have been using it for a couple of years now, and find, that for most purposes, it is just a little harder to get into than the

Re: [R] fixed effects transformation

2006-08-24 Thread ronggui
plm function in plm package are for panel data model. library(plm) ?plm 2006/8/24, Eduardo Leoni [EMAIL PROTECTED]: Hi - I am doing an analysis using panel data methods, particularly what economists call fixed effects. It can easily be done in R through the inclusion of factors in an lm

Re: [R] error message from lm.ridge() in MASS ***package***

2006-08-24 Thread Martin Maechler
jz7 == jz7 [EMAIL PROTECTED] on Tue, 22 Aug 2006 17:10:42 -0400 (EDT) writes: jz7 Dear all, jz7 I got a wierd problem when using lm.ridge() in MASS library. there is MASS the book and MASS the package, and there is even a MASS library (namely the file MASS.so or MASS.dll

[R] Waring message in mvBEKK.est

2006-08-24 Thread Arun Kumar Saha
Deal all R users, I am getting a warning message negative inverted hessian matrix element in: mvBEKK.est(weekly.return.all, order = c(2, 1)) while I am using mvBEKK.estlibrary to estimate time varying Covariance matrix using Bivariate Garch. Can anyone please tell me in details why I am getting

[R] Omegahat-site down?

2006-08-24 Thread Pfaff, Bernhard Dr.
Dear R-list subscriber, is it possible that the omegahat-site is down? I was looking for package 'RDCOMClient', but could not establish a connection. In case somebody has the latest binary zip-file for Windows, would she/he mind to send it directly to my emaim adress stated in the signature?

[R] Lost command area in R-SciViews

2006-08-24 Thread Stefan Th. Gries
Dear all I am writing with a question regarding SciViews for R. It's probably a slightly stupid question but I cannot find a solution to a very elementary problem. I am using SciViews 0.8.9 on with R 2.3.1pat on a Windows XP Home machine. R is set to SDI mode, I start R, enter library(svGUI),

Re: [R] Omegahat-site down?

2006-08-24 Thread Peter Dalgaard
Pfaff, Bernhard Dr. [EMAIL PROTECTED] writes: Dear R-list subscriber, is it possible that the omegahat-site is down? I was looking for package 'RDCOMClient', but could not establish a connection. In case somebody has the latest binary zip-file for Windows, would she/he mind to send it

[R] How to compare rows of two matrices

2006-08-24 Thread Muhammad Subianto
Dear all, I have a dataset train - cbind(c(0,2,2,1,0), c(8,9,4,0,2), 6:10, c(-1, 1, 1, -1, 1)) test - cbind(1:5, c(0,1,5,1,3), c(1,1,2,0,3) ,c(1, 1, -1, 1, 1)) I want to find which rows of train and test it different in its last column (column 4). The solution must be something like train

[R] syntax for pdDiag (nlme)

2006-08-24 Thread i.m.s.white
At the top of page 283 of Pinheiro and Bates, a covariance structure for the indomethicin example is specified as random = pdDiag(A1 + lrc1 + A2 + lrc2 ~ 1) The argument to pdDiag() looks like a two-sided formula, and I'm struggling to reconcile this with the syntax described in Ch4 of the book

Re: [R] How to compare rows of two matrices

2006-08-24 Thread Stephen C. Upton
Does this work for you? dd - mapply(==,train,test) dim(dd) - dim(train) dd [,1] [,2] [,3] [,4] [1,] FALSE FALSE FALSE FALSE [2,] TRUE FALSE FALSE TRUE [3,] FALSE FALSE FALSE FALSE [4,] FALSE FALSE FALSE FALSE [5,] FALSE FALSE FALSE TRUE HTH steve Muhammad Subianto wrote: Dear

Re: [R] How to compare rows of two matrices

2006-08-24 Thread Petr Pikal
Hi maybe simple math can do it. different (train[,4]-test[,4])!=0 same (train[,4]-test[,4])==0 if you are sure the numbers are integers HTH Petr On 24 Aug 2006 at 12:03, Muhammad Subianto wrote: Date sent: Thu, 24 Aug 2006 12:03:31 +0200 From: Muhammad

[R] my error with augPred

2006-08-24 Thread Petr Pikal
Dear all I try to refine my nlme models and with partial success. The model is refined and fitted (using Pinheiro/Bates book as a tutorial) but when I try to plot plot(augPred(fit4)) I obtain Error in predict.nlme(object, value[1:(nrow(value)/nL), , drop = FALSE], : Levels

[R] Intro to Programming R Book

2006-08-24 Thread Raphael Fraser
I am new to R and am looking for a book that can help in learning to program in R. I have looked at the R website suggested books but I am still not sure which book best suite my needs. I am interesting in programming, data manipulation not statistics. Any suggestions? Raphael

Re: [R] Authoring a book

2006-08-24 Thread Tom Backer Johnsen
Mark Orr wrote: Tom, i'm a psychologist with much interest in training future psychologists (and others) to use R/S+. So, if you need anyone to review or give feedback on draft versions of your work, I'd be happy to review. Thank you! That is a very generous offer. The project is so far

Re: [R] Intro to Programming R Book

2006-08-24 Thread Mitchell Maltenfort
I recently invested in two books: Venables and Ripley Modern Applied Statistics in S, and Everitt and Rabe Heskith's Analyzing Medical Data in S-Plus I think either one is a good self-teaching tool. On 8/24/06, Raphael Fraser [EMAIL PROTECTED] wrote: I am new to R and am looking for a book that

Re: [R] Intro to Programming R Book

2006-08-24 Thread John Kane
--- Raphael Fraser [EMAIL PROTECTED] wrote: I am new to R and am looking for a book that can help in learning to program in R. I have looked at the R website suggested books but I am still not sure which book best suite my needs. I am interesting in programming, data manipulation not

Re: [R] Intro to Programming R Book

2006-08-24 Thread Pikounis, Bill [CNTUS]
Hi Raphael: You mention being interested in programming, which covers many various topics itself. I wholeheartedly recommend: S Programming (2000) by Venables and Ripley . Don't let the date of the book nor the fact that R is not mentioned in the title dissuade you. Much like MASS by Venables

[R] Optim question

2006-08-24 Thread Doran, Harold
This is a very basic question, but I am a bit confused with optim. I want to get the MLEs using optim which could replace the newton-raphson code I have below which also gives the MLEs. The function takes as input a vector x denoting whether a respondent answered an item correctly (x=1) or not

[R] R and time series

2006-08-24 Thread Carlo Trimarchi
Hi, I'm new here. I need to use R to analyze a particular time serie. I have to estimate the pubblication of a news of an online newspaper, for example in the CNN site. I have many text files and every file correspond to a day. In every file I have two columns: 1) in the first column there is

[R] Please Ignore This is only a test mail

2006-08-24 Thread gyadav
Hi All, I regret for sending my question many times as there was some problem at my end. Further, I am just sending this post to confirm whether my post is reaching or not. Sayonara With Smile With Warm Regards :-) G a u r a v Y a d a v Senior Executive Officer, Economic Research

Re: [R] Authoring a book

2006-08-24 Thread Tom Backer Johnsen
Peter Dalgaard wrote: Tom Backer Johnsen [EMAIL PROTECTED] writes: Me and some colleagues are planning to write a textbook together (Statistics using R) where the target audience for the book is psychologists and students of psychology. We thought that it might be a good idea to use a Wiki

Re: [R] help: trouble using lines()

2006-08-24 Thread Petr Pikal
Hi not sure but are there some NA values in your data? what length(mtf) and length(fitted(f2)) tells you? And you need not to use assignment graph1 - plot() to output a plot on screen. HTH Petr On 24 Aug 2006 at 13:43, Simon Pickett wrote: Date sent: Thu, 24 Aug 2006

Re: [R] Intro to Programming R Book

2006-08-24 Thread Gabor Grothendieck
There is some online material at: http://zoonek2.free.fr/UNIX/48_R/all.html http://pj.freefaculty.org/R/statsRus.html On 8/24/06, Raphael Fraser [EMAIL PROTECTED] wrote: I am new to R and am looking for a book that can help in learning to program in R. I have looked at the R website suggested

Re: [R] help: trouble using lines()

2006-08-24 Thread Simon Pickett
Hi, thanks for replying. No, there arent any NA's in the original data set I think I must be mis-interpreting the use of lines()? in the example what exactly is y? lines(y,exp(tmp[1]+tmp[2])) In my case tmp[1] and tmp[2] are coeficients from the model so just one number (not a vector) and I

Re: [R] Authoring a book

2006-08-24 Thread Stefan Grosse
I think Peter Dalgaard is right. Since you are able to use R I believe you will be very fast in learning LaTeX. I think it needs less then a week to learn the most common LaTeX commands. And setting up a wiki and trying then to convert this into a printable document format plus learning the wiki

[R] lmer(): specifying i.i.d random slopes for multiple covariates

2006-08-24 Thread Fabian Scheipl
Dear readers, Is it possible to specify a model y=X %*% beta + Z %*% b ; b=(b_1,..,b_k) and b_i~N(0,v^2) for i=1,..,k that is, a model where the random slopes for different covariates are i.i.d., in lmer() and how? In lme() one needs a constant grouping factor (e.g.: all=rep(1,n)) and would

Re: [R] help: trouble using lines()

2006-08-24 Thread Petr Pikal
Hi from lines help page x, y coordinate vectors of points to join. and lines or points simply adds lines or points to existing plot. What do you want to plot with lines? HTH Petr On 24 Aug 2006 at 14:52, Simon Pickett wrote: Date sent: Thu, 24 Aug 2006 14:52:09 +0100 (BST)

Re: [R] Optim question

2006-08-24 Thread Dimitris Rizopoulos
Hi Harold, you're probably looking for something like: rasch.max2 - function(x, betas){ opt - function(theta){ -sum(dbinom(x, 1, plogis(theta - betas), log = TRUE)) } out - optim(log(sum(x)/(length(x)/sum(x))), opt, method = BFGS, hessian = TRUE) cat('theta is about',

[R] installing the x86_64 R Binary on Fedora Core 5

2006-08-24 Thread roger bos
I am looking for help install the x86_64 R Binary onto my FC5 machine. At the risk of subjecting myself to tons of criticism, I must confess that I don't know anything about Linux and I have never compiled R from source. Therefore, I choose FC5 because I see that a 64-bit binary is already

Re: [R] fixed effects transformation

2006-08-24 Thread Thomas Lumley
On Wed, 23 Aug 2006, Eduardo Leoni wrote: I created this function following Farnsworth (http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf) demean - function(x,index) { for (i in unique(index)) { for (j in 1:ncol(x)) { x.now - x[index==i,j] x[index==i,j] -

[R] Why are lagged correlations typically negative?

2006-08-24 Thread Bliese, Paul D LTC USAMH
Recently, I was working with some lagged designs where a vector of observations at one time was used to predict a vector of observations at another time using a lag 1 design. In the work, I noticed a lot of negative correlations, so I ran a simple simulation with 2 matched points. The crude

Re: [R] [Rd] reshape scaling with large numbers of times/rows

2006-08-24 Thread Gabor Grothendieck
On 8/24/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Here is one more solution . It uses the reshape package. Its faster than using reshape but not as fast as xtabs; however, it is quite simple -- just one line and if that matters it might be useful: library(reshape) system.time(w4 -

Re: [R] rgl: exporting to pdf or png does not work

2006-08-24 Thread Gaspard Lequeux
Hej, On Wed, 23 Aug 2006, Duncan Murdoch wrote: On 8/23/2006 5:15 PM, Gaspard Lequeux wrote: When exporting a image from rgl, the following error is encountered: rgl.postscript('testing.pdf', fmt=pdf) RGL: ERROR: can't bind glx context to window RGL: ERROR: can't bind glx context to

Re: [R] installing the x86_64 R Binary on Fedora Core 5

2006-08-24 Thread Marc Schwartz (via MN)
On Thu, 2006-08-24 at 10:53 -0400, roger bos wrote: I am looking for help install the x86_64 R Binary onto my FC5 machine. At the risk of subjecting myself to tons of criticism, I must confess that I don't know anything about Linux and I have never compiled R from source. Therefore, I choose

Re: [R] installing the x86_64 R Binary on Fedora Core 5

2006-08-24 Thread Stefan Grosse
Hi Roger, I dunno what exactly might be the source of that mistake but I would strongly recommend to install R while you are online. Often other packages must be installed for dependencies. (And then I recommend using the smart package manager ( http://labix.org/smart ) which is a great tool and

[R] problem in install on ubuntu

2006-08-24 Thread Bruno Grimaldo Martinho Churatae
Hi, the problem is: /usr/bin/ld: cannot find -lblas-3 collect2: ld returned 1 exit status make: ** [ape.so] Erro 1 ERROR: compilation failed for package 'ape' ** Removing '/usr/local/lib/R/site-library/ape' Any help would be appreciated. Thanks, Bruno G. M.

Re: [R] Why are lagged correlations typically negative?

2006-08-24 Thread Thomas Lumley
On Thu, 24 Aug 2006, Bliese, Paul D LTC USAMH wrote: Recently, I was working with some lagged designs where a vector of observations at one time was used to predict a vector of observations at another time using a lag 1 design. In the work, I noticed a lot of negative correlations, so I ran

Re: [R] Intro to Programming R Book

2006-08-24 Thread Joerg van den Hoff
Raphael Fraser wrote: I am new to R and am looking for a book that can help in learning to program in R. I have looked at the R website suggested books but I am still not sure which book best suite my needs. I am interesting in programming, data manipulation not statistics. Any suggestions?

Re: [R] problem in install on ubuntu

2006-08-24 Thread Ryan Austin
Hi Bruno, Your missing the Basic Linear Algebra Subroutines 3.0 package. apt-get install refblas3 should fix the problem. (At least in Debian, should be the same for Ubuntu) Ryan Bruno Grimaldo Martinho Churatae wrote: Hi, the problem is: /usr/bin/ld: cannot find -lblas-3 collect2: ld

Re: [R] problem in install on ubuntu

2006-08-24 Thread Ryan Austin
Sorry, that should be: apt-get install refblas3-dev apt-get install refblas3 should fix the problem. (At least in Debian, should be the same for Ubuntu) Ryan Bruno Grimaldo Martinho Churatae wrote: Hi, the problem is: /usr/bin/ld: cannot find -lblas-3 collect2: ld returned 1 exit status

Re: [R] installing the x86_64 R Binary on Fedora Core 5

2006-08-24 Thread roger bos
Thanks so much Marc Stefan! The GUI wasn't telling me what I was missing. The terminal told me I was missing tk-8.4.12-1.2.x86_64.rpm so I went and got that and it installed without errors. Then I could't figure out how to launch R through the GUI so I went back to the terminal and typed R and

Re: [R] help: trouble using lines()

2006-08-24 Thread Petr Pikal
Hi I have no experience with lmer and its plotting method. However If it uses plain (not grid) graphics you maybe shall consult abline and/or segments. If it uses grid, you shall consult panel.abline from lattice package. BTW. Better to copy your answer every time to the list as somebody

Re: [R] metaplot and meta.summaries

2006-08-24 Thread Thomas Lumley
On Thu, 24 Aug 2006, Anne Katrin Heinrichs wrote: metaplot: - Can I change the label size? I've got 126 values and the intersection of the labels makes it impossible to read them. Yes. metaplot() accepts the cex graphics parameter. This doesn't alter the size of the summary text,

[R] xyplot tick marks and line thickness

2006-08-24 Thread Piet Bell
Hello, A made a xyplot using the lattice library in R (latest version). The publisher of our paper has requested: 1. all tick marks should point inwards instead of outwards. 2. All lines should be thicker (lines, axes, boxes, etc. Everything). Lines is easy...I used: lwd=1.5

Re: [R] Why are lagged correlations typically negative?

2006-08-24 Thread Gabor Grothendieck
The covariance has the same sign as the correlation so lets calculate the sample covariance of the vector T1 = (X,Y) with T2 = (Y,Z) where we ignored the third component in each case due to use=complete. cov(T1, T2) = XY + YZ - (X+Y)/2 * (Y+Z)/2 X, Y and Z are random variables so we take

Re: [R] metaplot and meta.summaries

2006-08-24 Thread Anne Katrin Heinrichs
Thanks! Sorry, I forgot to add the output of meta.summaries: Random-effects meta-analysis Call: meta.summaries(d = CoeffVector, se = StdErrorVector, method = random, logscale = FALSE) Summary effect=NaN 95% CI (NaN, NaN) If anyone has further hints, what the problem is, that

Re: [R] rgl: exporting to pdf or png does not work

2006-08-24 Thread Duncan Murdoch
On 8/24/2006 11:19 AM, Gaspard Lequeux wrote: Hej, On Wed, 23 Aug 2006, Duncan Murdoch wrote: On 8/23/2006 5:15 PM, Gaspard Lequeux wrote: When exporting a image from rgl, the following error is encountered: rgl.postscript('testing.pdf', fmt=pdf) RGL: ERROR: can't bind glx context to

[R] Lattice symbol size and legend margins

2006-08-24 Thread Gattuso, Jean-Pierre
Hi: I am using the following command: xyplot(dat6$CO3*1e6 ~ dat6$irradiance, data=dat6, group=ref, xlab=list(label=expression(paste(Irradiance (, mu, mol photons, m^-2, , s^-1, ))), cex=1.3), ylab=list(label=expression(paste(Carbonate concentration (x , 10^6, , kg^-1, ))) ,

Re: [R] installing the x86_64 R Binary on Fedora Core 5

2006-08-24 Thread Marc Schwartz (via MN)
Roger, The Windows packages will not run on Linux. You will need to install them using the Linux versions (.tar.gz files) of the CRAN packages. You can copy them from a CRAN mirror to your USB drive and then install them locally using R CMD INSTALL PackageName.tar.gz This will again need

Re: [R] How to compare rows of two matrices

2006-08-24 Thread Muhammad Subianto
Dear Stephen C. Upton Petr Pikal Thank you both very much for the suggestions! Best wishes, Muhammad Subianto On this day 24/08/2006 12:03, Muhammad Subianto wrote: Dear all, I have a dataset train - cbind(c(0,2,2,1,0), c(8,9,4,0,2), 6:10, c(-1, 1, 1, -1, 1)) test - cbind(1:5, c(0,1,5,1,3),

Re: [R] Intro to Programming R Book

2006-08-24 Thread Roger Bivand
On Thu, 24 Aug 2006, Joerg van den Hoff wrote: Raphael Fraser wrote: I am new to R and am looking for a book that can help in learning to program in R. I have looked at the R website suggested books but I am still not sure which book best suite my needs. I am interesting in programming,

Re: [R] installing the x86_64 R Binary on Fedora Core 5

2006-08-24 Thread Prof Brian Ripley
On Thu, 24 Aug 2006, roger bos wrote: Thanks so much Marc Stefan! The GUI wasn't telling me what I was missing. The terminal told me I was missing tk-8.4.12-1.2.x86_64.rpm so I went and got that and it installed without errors. Then I could't figure out how to launch R through the GUI so

[R] Check values in colums matrix

2006-08-24 Thread Muhammad Subianto
Dear all, I apologize if my question is quite simple. I have a dataset (20 columns 1000 rows) which some of columns have the same value and the others have different values. Here are some piece of my dataset: obj - cbind(c(1,1,1,4,0,0,1,4,-1), c(0,1,1,4,1,0,1,4,-1),

Re: [R] xyplot tick marks and line thickness

2006-08-24 Thread Chuck Cleland
Piet Bell wrote: Hello, A made a xyplot using the lattice library in R (latest version). The publisher of our paper has requested: 1. all tick marks should point inwards instead of outwards. 2. All lines should be thicker (lines, axes, boxes, etc. Everything). Lines

Re: [R] xyplot tick marks and line thickness

2006-08-24 Thread Gabor Grothendieck
Look through the output of trellis.par.get() for the right parameters or when all else fails use grid (which we use below for the box around the panel since I could not locate the parameter): library(lattice) library(grid) x - 1:12 g - gl(3,4) lwd - 3 xyplot(x ~ x | g, type = l, lwd = lwd,

Re: [R] Lattice symbol size and legend margins

2006-08-24 Thread Gabor Grothendieck
Try par.settings= You can find examples via: RSiteSearch(par.settings) . On 8/24/06, Gattuso, Jean-Pierre [EMAIL PROTECTED] wrote: Hi: I am using the following command: xyplot(dat6$CO3*1e6 ~ dat6$irradiance, data=dat6, group=ref, xlab=list(label=expression(paste(Irradiance (, mu,

Re: [R] Intro to Programming R Book

2006-08-24 Thread Patrick Burns
S Poetry may be of use to you. Some things are now out-of-date and some things are wrong for R, but mostly it's right. And the price is right. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) Raphael Fraser

Re: [R] xyplot tick marks and line thickness

2006-08-24 Thread Deepayan Sarkar
On 8/24/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Look through the output of trellis.par.get() for the right parameters or when all else fails use grid (which we use below for the box around the panel since I could not locate the parameter): library(lattice) library(grid) x - 1:12 g

[R] forum.LancashireClubbers.co.uk - LAUNCH

2006-08-24 Thread Clubbing-UnknownLocations
(Mailing list information, including unsubscription instructions, is located at the end of this message.) __ LancashireClubbers.co.uk           Hi, LancashireClubbers.co.uk is pleased to announce the official launch of there forum - http://forum.lancashireclubbers.co.uk

Re: [R] xyplot tick marks and line thickness

2006-08-24 Thread Gabor Grothendieck
Here is a way to automate finding the lwd= parameters. library(lattice) # test data x - 1:12 g - gl(3, 4) lwd - 3 # set parameters par - trellis.par.get() par - lapply(par, function(x) replace(x, names(x) == lwd, lwd)) xyplot(x ~ x | g, type = l, par.settings = par) On 8/24/06, Chuck Cleland

Re: [R] xyplot tick marks and line thickness

2006-08-24 Thread Gabor Grothendieck
That should read finding and setting. Chuck already showed how to find them. On 8/24/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Here is a way to automate finding the lwd= parameters. library(lattice) # test data x - 1:12 g - gl(3, 4) lwd - 3 # set parameters par -

[R] ca.po Pz test question

2006-08-24 Thread Victor Gushchin
Hello, I have a few questions about Ouliaris Unit Root Test of type Pz 1) I noticed that critical values given in the article Asymptotic properties of residual... by Phillips and Ouliaris are different from those given by R. More presicely - they are swaped with each other. Could explain why?

Re: [R] Authoring a book

2006-08-24 Thread Tom Backer Johnsen
Stefan Grosse wrote: I think Peter Dalgaard is right. Since you are able to use R I believe you will be very fast in learning LaTeX. I think it needs less then a week to learn the most common LaTeX commands. And setting up a wiki and trying then to convert this into a printable document

[R] how to constrast with factorial experiment

2006-08-24 Thread szhan
Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to 11) of the fruit tree under treatment. I

Re: [R] extremely slow recursion in R?

2006-08-24 Thread MARK LEEDS
i'm sure someone else will explain the recursion issue but , as far as your program running a few days, you don't have to wait this long. if you are in windows and do a ctrl alt delete and then click on processes, if the memory usage being used by that R process is staying EXACTLY the same

Re: [R] extremely slow recursion in R?

2006-08-24 Thread Gabor Grothendieck
There was some discussion here: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/73646.html On 8/24/06, Jason Liao [EMAIL PROTECTED] wrote: I recently coded a recursion algorithm in R and ir ran a few days without returning any result. So I decided to try a simple case of computing binomial

Re: [R] how to constrast with factorial experiment

2006-08-24 Thread Ted Harding
On 24-Aug-06 [EMAIL PROTECTED] wrote: Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to

[R] extremely slow recursion in R?

2006-08-24 Thread Jason Liao
I recently coded a recursion algorithm in R and ir ran a few days without returning any result. So I decided to try a simple case of computing binomial coefficient using recusrive relationship choose(n,k) = choose(n-1, k)+choose(n-1,k-1) I implemented in R and Fortran 90 the same algorithm (code

Re: [R] rgl: exporting to pdf or png does not work

2006-08-24 Thread Gaspard Lequeux
Hej, On Thu, 24 Aug 2006, Duncan Murdoch wrote: On 8/24/2006 11:19 AM, Gaspard Lequeux wrote: On Wed, 23 Aug 2006, Duncan Murdoch wrote: On 8/23/2006 5:15 PM, Gaspard Lequeux wrote: When exporting a image from rgl, the following error is encountered: rgl.postscript('testing.pdf',

[R] generating an expression for a formula automatically

2006-08-24 Thread Maria Montez
Hi! I would like to be able to create formulas automatically. For example, I want to be able to create a function that takes on two values: resp and x, and then creates the proper formula to regress resp on x. My code: fit.main - function(resp,x) { form - expression(paste(resp, ~

Re: [R] Check values in colums matrix

2006-08-24 Thread Paul Smith
On 8/24/06, Muhammad Subianto [EMAIL PROTECTED] wrote: I have a dataset (20 columns 1000 rows) which some of columns have the same value and the others have different values. Here are some piece of my dataset: obj - cbind(c(1,1,1,4,0,0,1,4,-1), c(0,1,1,4,1,0,1,4,-1),

Re: [R] generating an expression for a formula automatically

2006-08-24 Thread Gabor Grothendieck
Use as.formula to convert the character string to an object of class formula and note that we want to set the formula's environment appropriately: fit.main - function(resp, x, env = parent.frame()) { fo - as.formula(paste(y, ~, paste(x, collapse = +))) environment(fo) - env

[R] Problem in library.dynam problems on Linux

2006-08-24 Thread Sinnwell, Jason P.
We have R 2.2.1 installed on a Linux cluster that seems to have problems loading either of our shared object libraries for packages. This seems to be happening on both local and global versions of packages that we install. However, we have only noticed this problem in the past 3 months on

[R] Using a 'for' loop : there should be a better way in R

2006-08-24 Thread John Kane
I need to apply a yearly inflation factor to some wages and supply some simple sums by work category. I have gone at it with a brute force for loop approach which seems okay as it is a small dataset. It looks a bit inelegant and given all the warnings in the Intro to R, etc, about using loops I

Re: [R] generating an expression for a formula automatically

2006-08-24 Thread Marc Schwartz (via MN)
On Thu, 2006-08-24 at 14:01 -0700, Maria Montez wrote: Hi! I would like to be able to create formulas automatically. For example, I want to be able to create a function that takes on two values: resp and x, and then creates the proper formula to regress resp on x. My code: fit.main -

Re: [R] generating an expression for a formula automatically

2006-08-24 Thread Sundar Dorai-Raj
Maria Montez wrote: Hi! I would like to be able to create formulas automatically. For example, I want to be able to create a function that takes on two values: resp and x, and then creates the proper formula to regress resp on x. My code: fit.main - function(resp,x) { form -

Re: [R] Check values in colums matrix

2006-08-24 Thread John Kane
--- Muhammad Subianto [EMAIL PROTECTED] wrote: Dear all, I apologize if my question is quite simple. I have a dataset (20 columns 1000 rows) which some of columns have the same value and the others have different values. Here are some piece of my dataset: obj -

[R] R News, volume 6, issue 3 is now available

2006-08-24 Thread Paul Murrell
Hi The August 2006 issue of R News is now available on CRAN under the Documentation/Newsletter link. Many thanks to Ron Wehrens, our guest editor for this special issue. Paul (on behalf of the R News EditorialBoard) -- Dr Paul Murrell Department of Statistics The University of Auckland Private

Re: [R] Problem in library.dynam problems on Linux

2006-08-24 Thread Peter Dalgaard
Sinnwell, Jason P. [EMAIL PROTECTED] writes: We have R 2.2.1 installed on a Linux cluster that seems to have problems loading either of our shared object libraries for packages. This seems to be happening on both local and global versions of packages that we install. However, we have

Re: [R] Using a 'for' loop : there should be a better way in R

2006-08-24 Thread Gabor Grothendieck
Use cbind to create a two column matrix, mat, and multiply that by the appropriate inflation factors. Then use rowsum to sum the rows according to the id grouping factor. inf.fac - list(year1 = 1, year2 = 5, year3 = 10) mat - cbind(s1 = df1$cat1 + df1$cat2, s2 = df1$cat3 + df1$cat4) rowsum(mat *

Re: [R] extremely slow recursion in R?

2006-08-24 Thread Thomas Lumley
On Thu, 24 Aug 2006, Jason Liao wrote: I recently coded a recursion algorithm in R and ir ran a few days without returning any result. So I decided to try a simple case of computing binomial coefficient using recusrive relationship choose(n,k) = choose(n-1, k)+choose(n-1,k-1) I implemented

Re: [R] Check values in colums matrix

2006-08-24 Thread Gabor Grothendieck
Try sd(obj.tr) which will give a vector of standard deviations, one per column. A column's entry will be zero if and only if all values in the column are the same. On 8/24/06, Muhammad Subianto [EMAIL PROTECTED] wrote: Dear all, I apologize if my question is quite simple. I have a dataset (20

[R] Need help with difficulty loading page www.bioconductor.org

2006-08-24 Thread Debashis Bhattacharya
The page is either too busy, or there is something seriously wrong with access to this page. Most of the time, trying to reach www.bioconductor.org results in failure. Only once in a blue moon, do I get through. In fact, thus far, I have not been able to install bioconductor, since the first

Re: [R] Check values in colums matrix

2006-08-24 Thread Berton Gunter
Absolutely. But do note that if the values in obj are the product of numerical computations then columns of equal values may turn out to be only **nearly** equal and so the sd may turn out to be **nearly** 0 and not exactly 0. This is a standard issue in numerical computation, of course, and has

Re: [R] Check values in colums matrix

2006-08-24 Thread Gabor Grothendieck
Fair enough although in the case of the example it does not appear to be a problem: sd(obj.tr) [1] 0.3535534 0.000 0.000 0.000 2.5495098 0.000 0.000 [8] 1.5811388 0.000 Further, if all entries in the matrix are integers, as in the example, then we know that: nr -

[R] [R-pkgs] zoo: new version 1.2-0

2006-08-24 Thread Achim Zeileis
Dear useRs, the new version 1.2-0 of the zoo package for dealing with regular and irregular time series data is available from the CRAN mirrors. This version includes two important changes/enhancements: - rapply() was re-named to rollapply() because from R 2.4.0 on, base R provides a

[R] [R-pkgs] sandwich: new version 2.0-0

2006-08-24 Thread Achim Zeileis
Dear useRs, a new version 2.0-0 of the sandwich package for estimating sandwich covariance matrices is available from the CRAN mirrors. The tools for computing heteroskedasticity (and autocorrelation) consistent covariance matrix estimators (also called HC and HAC estimators, including the

[R] tcltk command to figure out which widget in active or in focus

2006-08-24 Thread Vladislav Petyuk
Hi, I'm making an interface, where a Tcl/Tk window have few listbox widgets. I need to select separate parameters from separate listboxes. It is clear how to get cursor selection value, once you know which listbox widget you clicked. The problem is I can't figure out which one tcltk command to

Re: [R] Check values in colums matrix

2006-08-24 Thread Bill.Venables
As a minor footnote to both of these, I would add that both assume that all the columns of the dataset are numeric. It doesn't cost much to generalize it to cover any matrix structure, of any mode: constantColmuns - function(Xmat) which(apply(Xmat, 2, function(z) length(unique(z)) == 1))