[R] Two problems with write.foreign (SPSS)

2006-05-29 Thread Ulrich Keller
Hello, Working on a little primer to ease the transition from SPSS to R, I have encountered two problems with write.foreign. One is cosmetic (but still annoying): the text data files will contain "NA" for missing values. Each time SPSS encounters an NA, it will print a warning. This could be e

Re: [R] OT: Monograph on Statistical Programming

2006-05-29 Thread Liaw, Andy
I'd say most books on statistical computing would sort of fit your description, but few will have code examples. The ones I have (and liked) are Thisted, Monahan (which has Fortran code available), and the Handbook of Statistical Computing (edited volume). Prof. Gentle has at least two volumes in

Re: [R] line over multiplot

2006-05-29 Thread Greg Snow
It may be as simple as setting par(xpd=NA) see ?par for what that does. If you want more control (prevent the line from going through titles, etc) then look at the examples for the cnvrt.coords function in the TeachingDemos package. Hope this helps, -Original Message- From: [EMAIL PROT

Re: [R] Is there a way to draw 3d plot?

2006-05-29 Thread Greg Snow
It may be that since the original poster is coming from matlab others considered it best to start with the persp function that does not require additional packages or the other complications that come with lattice/trellis graphics. Actually my response indirectly brings cloud and wireframe int

[R] contour help

2006-05-29 Thread Alexander Nervedi
Hi I'd like to draw some level plots but I just cant for the live of me figure out how to control the axis here. The axis for both the contour plots below appear to be the same, although one is a subset of the other. I was wondering how I could explicitly specify the xand y axis locations here

[R] contour help

2006-05-29 Thread Alexander Nervedi
Hi I'd like to draw some level plots but I just cant for the live of me figure out how to control the axis here. The axis for both the contour plots below appear to be the same, although one is a subset of the other. I was wondering how I could explicitly specify the xand y axis locations here

Re: [R] R and ViM

2006-05-29 Thread Michael Graber
dear all, to close the open question i asked more than a month ago, i would like to tell you my conclusions: exchanging emails with larry clapp who wrote funnel.pl, i found out that the tasks i wanted to be done by funnel.pl could actually, and much more, also be done by gnuscreen (http://www

Re: [R] combinatorial programming problem

2006-05-29 Thread Charles C. Berry
On Mon, 29 May 2006, Martin Maechler wrote: >> "SpG" == Spencer Graves <[EMAIL PROTECTED]> >> on Sun, 28 May 2006 16:21:53 -0700 writes: > >SpG> I'm not sure I understand your question, but >SpG> are you asking how to index choose(k, r) objects? >SpG> Almost 3 years

[R] useR! 2006: final program

2006-05-29 Thread Achim Zeileis
Dear useRs, the final scientific program for "useR! 2006", the second R user conference taking place in Vienna June 15-17, is now available online at http://www.R-project.org/useR-2006/ The registration is open until May 31, so you still have two days to register for this exciting event

Re: [R] multiple comparisons of time series data

2006-05-29 Thread Thomas Adams
Kyle, You might try the Wilcoxon Rank Sum test (and there is also the paired rank sum test) that may be useful. Both are found in R. There is an application of the test in the textbook by Loucks, D.P., Stedinger J.R., and Haith, D., 1981. "Water Resources Systems Planning and Analysis", Prenti

Re: [R] line over multiplot

2006-05-29 Thread Uwe Ligges
Thomas Hoffmann wrote: > Dear Listmembers, > > I do have a multiplot with 1 row and 4 columns (4 scatter plots with > same x- and y-axe plotted in one row). I would like to draw a horizontal > line across the whole multiplot at a certain y-value. Unfortunately the > normal abline command stops

[R] line over multiplot

2006-05-29 Thread Thomas Hoffmann
Dear Listmembers, I do have a multiplot with 1 row and 4 columns (4 scatter plots with same x- and y-axe plotted in one row). I would like to draw a horizontal line across the whole multiplot at a certain y-value. Unfortunately the normal abline command stops between the plot. I hope my proble

Re: [R] lme, best model without convergence

2006-05-29 Thread Spencer Graves
I'm sorry. My post was in error on that point. I did "rm(fm1.)", then tried again and got the same error message you got. Conclusion: Either the 'returnObject' argument doesn't work in the version(s) of lme that you and I are using or we've flunked another literacy exam w

Re: [R] parameter-restrictions in OPTIM

2006-05-29 Thread Patrick Burns
One trick is to add a penalty to your function for violations of the linear constraint. However, if the constraint is binding, then gradient methods may not perform well since the objective won't be differentiable there. If the constraint looks to be binding, then you can reparameterize to a sing

Re: [R] Is there a way to draw 3d plot?

2006-05-29 Thread Ritwik Sinha
Hi, I am not aware what this function does in matlab, but I was wondering why "cloud" or "wireframe" in the lattice package has not entered the discussion. Sorry if I am being naive. Ritwik. http://darwin.cwru.edu/~rsinha [[alternative HTML version deleted]] ___

Re: [R] how to multiply a constant to a matrix?

2006-05-29 Thread Martin Maechler
> "comtech" == comtech usa <[EMAIL PROTECTED]> > on Tue, 23 May 2006 23:14:21 -0700 writes: comtech> imagine when you have complicated matrix algebra computation using R, comtech> you cannot prevent some middle-terms become quadratic and absorbs into one comtech> scalar,

Re: [R] parameter-restrictions in OPTIM

2006-05-29 Thread Ingmar Visser
You could reparametrize or use constrOptim, Hth, Ingmar > From: Florian Staab <[EMAIL PROTECTED]> > Date: Mon, 29 May 2006 12:08:59 +0200 > To: > Subject: [R] parameter-restrictions in OPTIM > > Hallo, I'm trying to optimize a function A which calls another function B > internally. > > This fu

Re: [R] mtext in trellis-loop & colorkey

2006-05-29 Thread Deepayan Sarkar
On 5/29/06, Marius Hofert <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to create a sequence of plots (using a for loop). I read > in the FAQ that print() has to be used in order to obtain any output. > This works perfectly fine as long as I only consider one function > call in the loop, but

[R] OT: Monograph on Statistical Programming

2006-05-29 Thread Rau, Roland
Dear all, my question might be a bit off-topic. Is there anything like a standard textbook on statistical programming? With that I don't mean anything like MASS, S Programming, Programming with Data, ... (no offense meant, they are fantastic books and each of those three helped me a great deal). R

[R] parameter-restrictions in OPTIM

2006-05-29 Thread Florian Staab
Hallo, I'm trying to optimize a function A which calls another function B internally. This function A has got two input parameters, say a1 and a2. Using OPTIM there ist no problem restricting these parameters: 0 <= a1 <= 1 and 0 <= a2 <= 1. My problem is an additional restriction 0 <= a1+a2 <

Re: [R] newbie question: ROW average

2006-05-29 Thread Peter Dalgaard
A Ezhil <[EMAIL PROTECTED]> writes: > When I tried with (assuming 'M' is my old matrix): > > dim(M) <- c(4,248,74) > mn <- apply(M, c(2,3), mean) > > the following error occured: > Error: dim<- : dims [product 73408] do not match the > length of object [74] In that case, M clearly wasn't a 992

Re: [R] newbie question: ROW average

2006-05-29 Thread A Ezhil
Hi, Thank you all (Dimitris, Peter, Rolf, Gabor) for your suggestions. I tried with all your suggestions. I am getting different answers when I use: rowsum(mat, gl(nrow(mat)/4, 4)) / 4 and m.new <- t(apply(array(t(m.old),dim=c(74,4,992/4)),c(1,3),mean)) When I tried with (assuming 'M' is my

[R] 29/05/06

2006-05-29 Thread lottery luckyday
LUCKYDAY LOTTO 1102 VAN DER TRAAT AMSTERDAM THE NETHERLANDS www.luckyday.nl Dear Winner, We are please to announce you as one of the 10 lucky winners in the luckyday Lotto draw held yesterday the 2nd of May 2006.All 10 winning Addresses were randomly selected from a batch of 50,000,000 in

[R] TsayData

2006-05-29 Thread SUMANTA BASAK
Hi, I'm trying to work with TsayData in fSeries package. How can i fetch any time series data of this package. Please advice. Thanks, Sumanta Basak. Send instant messages to your online friends http://in.messenger.yahoo.com __ R-help@stat.math.ethz.c

Re: [R] query: lme

2006-05-29 Thread Doran, Harold
As noted below, it is hard to diagnose the specific issue. But, as a recommendation, I would suggest using lmer and then investigating the parameters of the model using the MCMCsamp() function. You can then do all diagnostics using the various functions in the coda package as MCMCsamp() returns

Re: [R] newbie question: ROW average

2006-05-29 Thread Gabor Grothendieck
Try this: rowsum(mat, gl(nrow(mat)/4, 4)) / 4 On 5/29/06, A Ezhil <[EMAIL PROTECTED]> wrote: > Hi, > > I am new to R programming. I have a 992 x 74 matrix. I > would like to form a new matrix by averging each 4 > rows > from the original one. How can I use 'apply' instead > of usual mean insid

Re: [R] newbie question: ROW average

2006-05-29 Thread Dimitris Rizopoulos
yes you're right; it was my mistake. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/

Re: [R] newbie question: ROW average

2006-05-29 Thread Rolf Turner
Dimitris Rizopoulos wrote: > look at ?rowMeans; you can also use "apply(mat, 1, mean)" but > rowMeans() is better. By my reading of the question, this is not what Ezhil wants. He said: ``I have a 992 x 74 matrix. I would like to form a new matrix by averaging

Re: [R] newbie question: ROW average

2006-05-29 Thread Rolf Turner
Peter Dalgaard wrote: > How about > > dim(M) <- c(4,248,74) > mn <- apply(M, c(2,3), mean) Hey! That's sexy! Much better than my kludgy suggestion! cheers, Rolf __ R-help@sta

Re: [R] mtext in trellis-loop & colorkey

2006-05-29 Thread Sundar Dorai-Raj
Marius Hofert wrote: > Hello, > > I would like to create a sequence of plots (using a for loop). I read > in the FAQ that print() has to be used in order to obtain any output. > This works perfectly fine as long as I only consider one function > call in the loop, but I would like to add mt

Re: [R] query: lme

2006-05-29 Thread Andrew Robinson
I'm not exactly certain, but it seems to me that you're including a factor in the LHS of the random term. You might write down the model that you're fitting, and reflect upon it. Of course, there may be a perfectly good reason, but that does make for an exceptionally complicated model. You might

Re: [R] newbie question: ROW average

2006-05-29 Thread Peter Dalgaard
A Ezhil <[EMAIL PROTECTED]> writes: > Hi, > > I am new to R programming. I have a 992 x 74 matrix. I > would like to form a new matrix by averging each 4 > rows > from the original one. How can I use 'apply' instead > of usual mean inside the nested for loop? How about dim(M) <- c(4,248,74) mn

Re: [R] mtext in trellis-loop & colorkey

2006-05-29 Thread P Ehlers
mtext() is not a lattice function. Could you not use the 'main' argument? Peter Ehlers Marius Hofert wrote: > Hello, > > I would like to create a sequence of plots (using a for loop). I read > in the FAQ that print() has to be used in order to obtain any output. > This works perfectly fine

Re: [R] newbie question: ROW average

2006-05-29 Thread Dimitris Rizopoulos
look at ?rowMeans; you can also use "apply(mat, 1, mean)" but rowMeans() is better. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/

[R] newbie question: ROW average

2006-05-29 Thread A Ezhil
Hi, I am new to R programming. I have a 992 x 74 matrix. I would like to form a new matrix by averging each 4 rows from the original one. How can I use 'apply' instead of usual mean inside the nested for loop? Thanks in advance. regards, ezhil __ R-h

Re: [R] Analog to matlab repmat function

2006-05-29 Thread Gabor Grothendieck
Actually google does understand R. For example, 1. google for: R and you will get the R home page.as first hit 2. google for R repmat and you will find Robin Hankin's lexicon that translates between R and octave/maxima which includes a repmat function as 7th hit. On 5/29/06, Daniil I

[R] Analog to matlab repmat function

2006-05-29 Thread Daniil Ivanov
Thanks a lot to all of you! Now I see, that use of R (and S) is very different from use of Matlab. There is no one-to-one correspondence. I'm shy to ask so stupid questions, but name of language R makes it hard to find relevant links trough google. Thanks for pointing to "S Poetry", I would n

[R] mtext in trellis-loop & colorkey

2006-05-29 Thread Marius Hofert
Hello, I would like to create a sequence of plots (using a for loop). I read in the FAQ that print() has to be used in order to obtain any output. This works perfectly fine as long as I only consider one function call in the loop, but I would like to add mtext() to the each plot in the loo

Re: [R] Load a program from internet

2006-05-29 Thread David Hajage
ok... I've juste understood that my computer (at work) doesn't let R access to internet... That's why I was wondering if it works ! I've made a function which adds "exposed to risk" on your survival curve... If you want to try : source("http://pepereblog.free.fr/blog/share/tigeR%202.0.r";) tige

[R] troubles with kzft

2006-05-29 Thread Lorenzo Bencivelli
I need to compute the Fourier transformation of the autocovariance function of a panel composed by 196 time series. With autocovarance function i mean a matrix Gamma(u) which contains the covariance of all the variables at time (t) with all the variables evaluated at time (t-u). It can be repres

Re: [R] Load a program from internet

2006-05-29 Thread Peter Dalgaard
"David Hajage" <[EMAIL PROTECTED]> writes: > Hello, > > I know how to load a program from my computer with the command "source". > > example : > source("home/david/prog.r") > > But is it possible to load a program from the internet ? > > example : > source("http://davidblog/prog.r";) Yes

[R] variation on vioplot?

2006-05-29 Thread Karin Lagesen
I have been using the package vioplot to make boxplot/densityplots. Now I am looking for a variation of this, and I was wondering if someone could give me any tips on how to do what I want. I have nine groups of values, each group containing two sets of numbers which show the difference between t

[R] Load a program from internet

2006-05-29 Thread David Hajage
Hello, I know how to load a program from my computer with the command "source". example : source("home/david/prog.r") But is it possible to load a program from the internet ? example : source("http://davidblog/prog.r";) -- David [[alternative HTML version deleted]] _

[R] query: lme

2006-05-29 Thread Pryseley Assam
Good R-users, I have difficulties accessing the variance components for an lme fit when the variance covariance matrix of the random effects is not positive definite. For example, i fit the following model: ggg <- lme (ST~ -1 + as.factor(endp):Z.sas + as.factor(endp), data=dat2a

Re: [R] Question regarding reading arrayvision files in limma

2006-05-29 Thread Florence Combes
Dear Debayan, I only use Genepix files but I will try to help you with the experience I have concerning layout troubleshooting and limma. First : RG$R, RG$Rb, RG$G and RG$Gb seem strange to me. As I understand these data, it has to be a vector of the same length than the number of spots. It seems

Re: [R] combinatorial programming problem

2006-05-29 Thread Martin Maechler
> "SpG" == Spencer Graves <[EMAIL PROTECTED]> > on Sun, 28 May 2006 16:21:53 -0700 writes: SpG> I'm not sure I understand your question, but SpG> are you asking how to index choose(k, r) objects? SpG> Almost 3 years ago, I asked a question like this. Andy SpG>