Re: [R] Colour-coding intervals on a line

2006-08-11 Thread vincent
Sara-Jane Dunn a écrit : > I need to know if there is any way of using different colours for > different intervals of a line on a graph. Eg. If I plot the line y=x for > x=1:10, and split this line into 106 intervals (i.e. not a 'nice' number > of intervals) how could I colour different intervals

Re: [R] Auto-save possible in R?

2006-08-11 Thread vincent
John Morrow a écrit : > Hello fellow R'ers, I have a simple calculation with a very large data set > being generated (34.9 million values) on a somewhat unreliable XP box that > will likely take ~ 74hrs. I wanted to know if there is a way to have my > script automatically "save.image()" throughou

[R] anova.mlm for single model (one-way repeated measured anova)

2006-08-11 Thread takahashi kohske
Dear list members: I'd like to one-way repeated measured anova by using mlm. I'm using R-2.3.1 and my code is: dat<-matrix( c(9,7,8,8,12,11,8,13, 6,5,6,3,6,7,10,9, 10,13,8,13,12,14,14,16, 9,11,13,14,16,12,15,14), ncol=4, dimname=list(s=1:8, c=1:4)) mlmfit<-lm(dat~1)

Re: [R] problem in reading large files

2006-08-11 Thread Duncan Murdoch
On 8/11/2006 8:50 PM, T Mu wrote: > I was trying to read a large .csv file (80 colums, 400,000 rows, size of > about 200MB). I used scan(), R 2.3.1 on Windows XP. My computer is AMD 2000+ > and has 512MB ram. You should get R-patched; there were some bugs with low memory handling fixed recently:

Re: [R] problem in reading large files

2006-08-11 Thread jim holtman
You might consider processing this is pieces. If I assume that this is numeric data, then 'after' conversion this will take up 256MB of RAM which is 1/2 your real memory. This means that you will probably not be able to do any processing of the data since you will probably have to make copies of p

[R] problem in reading large files

2006-08-11 Thread T Mu
I was trying to read a large .csv file (80 colums, 400,000 rows, size of about 200MB). I used scan(), R 2.3.1 on Windows XP. My computer is AMD 2000+ and has 512MB ram. It sometimes freezes my PC, sometimes just shuts down R quitely. Is there a way (option, function) to better handle large files?

Re: [R] x tick labels - sparse?

2006-08-11 Thread Gabor Grothendieck
Try this: x <- seq(-100,1000,25) y <- x * x plot(x, y, xaxt = "n") axis(1, x[x %% 100 == 0]) On 8/11/06, Darren Weber <[EMAIL PROTECTED]> wrote: > Hi, > > I'm stuck on creating a plot with x tick labels for every Nth tick > mark - how is that done? I don't see a simple solution to this in > he

[R] sort() for time/date objects (was: more on date conversion differences in 2.2.1 vs 2.3.1)

2006-08-11 Thread Achim Zeileis
On Sat, 12 Aug 2006 09:25:10 +1000 paul sorenson wrote: > With dates I get different results with 2.2.1 and 2.3.1. From my > somewhat naive point point of view, the 2.2.1 behaviour seems more > sensible. Your example below does not really make the source of the problem obvious. I tried to see w

Re: [R] Auto-save possible in R?

2006-08-11 Thread Duncan Murdoch
On 8/11/2006 4:05 PM, John Morrow wrote: > Hello fellow R'ers, I have a simple calculation with a very large data set > being generated (34.9 million values) on a somewhat unreliable XP box that > will likely take ~ 74hrs. I wanted to know if there is a way to have my > script automatically "save.

[R] x tick labels - sparse?

2006-08-11 Thread Darren Weber
Hi, I'm stuck on creating a plot with x tick labels for every Nth tick mark - how is that done? I don't see a simple solution to this in help(plot) or help(par) and what I've tried is not working, eg, the following does not work, although it seems intuitive to me that it should work: x <- seq(-1

[R] more on date conversion differences in 2.2.1 vs 2.3.1

2006-08-11 Thread paul sorenson
With dates I get different results with 2.2.1 and 2.3.1. From my somewhat naive point point of view, the 2.2.1 behaviour seems more sensible. Running the code below in 2.2.1: V1 2006-08-01 2006-08-01 1 1 With 2.3.1 I get: V1 1154354400 1154440800 1 1

Re: [R] invisible() - does not return immediately as return() does

2006-08-11 Thread Seth Falcon
Matthias Burger <[EMAIL PROTECTED]> writes: > Hi, > > I stumbled across the following (unexpected for me) behavior after > replacing a return() statement in the middle of a function by invisible(). > > Example: > foo <- function() { cat("before\n"); return(); cat("after\n")} >>foo() > before > NUL

Re: [R] rpvm/snow packages on a cluster with dual-processor machi nes

2006-08-11 Thread Paul Y. Peng
Luke Tierney just reminded me that makeCluster() can take a number greater than the number of machines in a cluster. It seems to be a solution to this problem. But I haven't tested it yet. Paul. Ryan Austin wrote: > Hi, > > Adding a node twice gives a duplicate node error. > However, adding t

Re: [R] invisible() - does not return immediately as return() does

2006-08-11 Thread Christos Hatzis
Hi, The difference is in the _return_ value of the function. E.g. > foo <- function() { cat("before\n"); cat("after\n"); return("done")} > foo() before after [1] "done" i.e. returns the return value "done". However > foo2 <- function() { cat("before\n"); cat("after\n"); invisible("done")} > foo

[R] invisible() - does not return immediately as return() does

2006-08-11 Thread Matthias Burger
Hi, I stumbled across the following (unexpected for me) behavior after replacing a return() statement in the middle of a function by invisible(). Example: foo <- function() { cat("before\n"); return(); cat("after\n")} >foo() before NULL foo2 <- function() { cat("before\n"); invisible(TRUE); cat

Re: [R] problem with tseries (was unable to restore saved data)

2006-08-11 Thread Achim Zeileis
On Wed, 9 Aug 2006 07:58:45 +0100 (BST) Prof Brian Ripley wrote: > Loading the workspace is done before loading the standard set of > packages. This appears to be a bug in tseries, for if its namespace > needs 'time', it should import it from 'stats', and it is not even > depending on 'stats'. [.

[R] Auto-save possible in R?

2006-08-11 Thread John Morrow
Hello fellow R'ers, I have a simple calculation with a very large data set being generated (34.9 million values) on a somewhat unreliable XP box that will likely take ~ 74hrs. I wanted to know if there is a way to have my script automatically "save.image()" throughout the calculation in case of a

Re: [R] rpvm/snow packages on a cluster with dual-processor machi nes

2006-08-11 Thread Ryan Austin
Hi, Adding a node twice gives a duplicate node error. However, adding the parameter sp=2000 to your pvm hostfile should enable dual processors. Ryan Liaw, Andy wrote: >Caveat: I've only played with this a couple of years ago... > >I believe you can just add each host _twice_ (or as many times

Re: [R] rpvm/snow packages on a cluster with dual-processor machi nes

2006-08-11 Thread Liaw, Andy
Caveat: I've only played with this a couple of years ago... I believe you can just add each host _twice_ (or as many times as the number of CPUs at that host) to get both CPUs to work. Andy From: Paul Y. Peng > > Hi, > > does anybody know how to use the dual processors in the > machines of a

Re: [R] An apply and rep question

2006-08-11 Thread Horace Tso
Thanks Gabor, Andy, and Phil. I learn new trick, particularly the use of gl(). H. >>> "Gabor Grothendieck" <[EMAIL PROTECTED]> 8/11/2006 12:01 PM >>> The approach here is to perform the repetition on the indices (or rownames) rather than on the data frame directly. Using the builtin data frame B

Re: [R] An apply and rep question

2006-08-11 Thread Liaw, Andy
The trick is to rep() the index, not the data: R> dat2 <- dat[rep(1:nrow(dat), each=2), ] R> dat2 DDate OffP 1 2005-01-01 41.23 1.1 2005-01-01 41.23 2 2005-01-02 44.86 2.1 2005-01-02 44.86 3 2005-01-03 44.86 3.1 2005-01-03 44.86 4 2005-01-04 43.01 4.1 2005-01-04 43.01 5 2005-01

Re: [R] An apply and rep question

2006-08-11 Thread Gabor Grothendieck
The approach here is to perform the repetition on the indices (or rownames) rather than on the data frame directly. Using the builtin data frame BOD any of the following would work: BOD[gl(nrow(BOD), 2),] BOD[rep(1:nrow(BOD), each = 2),] BOD[rep(rownames(BOD), each = 2),] On 8/11/06, Horace Tso

Re: [R] [BioC] problem loading affycoretools - solved!

2006-08-11 Thread Jenny Drnevich
Hi Martin, The patched version works fine - thanks for pointing it out! As for problems installing RWinEdt, do you have WinEdt downloaded and installed? www.winedt.com I've found it to be a useful editor for R - well worth the nominal fee after the trial period has ended. Cheers, Jenny At

[R] An apply and rep question

2006-08-11 Thread Horace Tso
Hi list, I'm sure the explanation must be laughably simple to the experts out there, but I just could figure it out. I have a simple data frame that looks like, >head(da.off) DDate OffP 1 2005-01-01 41.23 2 2005-01-02 44.86 3 2005-01-03 44.86 4 2005-01-04 43.01 5 2005-01-05 45.47 6 2005-0

Re: [R] Multiple density curves

2006-08-11 Thread Gabor Grothendieck
Here is one more solution. This one uses lattice. Its a bit shorter than the classic graphics solution. In the classic graphics version we used shading and color to distinguish the bars; however, grid, and therefore lattice, do not easily support shading (its possible to simulate it using low le

Re: [R] Creating SAS transport files

2006-08-11 Thread Haynes, Maurice \(NIH/NICHD\) [E]
See the argument package="SAS" to the function write.foreign() in the package foreign. HTH Maurice Haynes -Original Message- From: Bill Knebel [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 2:16 PM To: r-help@stat.math.ethz.ch Subject: [R] Creating SAS transport files Is th

Re: [R] Creating SAS transport files

2006-08-11 Thread Kevin E. Thorpe
Bill Knebel wrote: > Is there any package in R to create a SAS transport file? I checked the > help archive and did not find any references to creating SAS transport > files in R, only reading them. > > Bill > I have used write.foreign in the foreign package. This produces a text data file a

[R] Creating SAS transport files

2006-08-11 Thread Bill Knebel
Is there any package in R to create a SAS transport file? I checked the help archive and did not find any references to creating SAS transport files in R, only reading them. Bill -- Bill Knebel, PharmD, Ph.D. Principal Scientist Metrum Research Group 2 Tunxis Road Suite 112 Tariffville, CT 06

Re: [R] rpvm/snow packages on a cluster with dual-processor machines

2006-08-11 Thread Ramon Diaz-Uriarte
Dear Paul, I am leaving right now. I'll send you the info over the weekend. But note that I do think it is quite possible to use pvm for your setup. I just have no experience with it. R. On Friday 11 August 2006 19:21, Paul Y. Peng wrote: > Hi Ramon, > > please let me know how you achieve this

Re: [R] How to speed up nested for loop computations

2006-08-11 Thread Max Manfrin
On 11 Aug 2006, at 12:40, jim holtman wrote: In your split, you used the dataframe. What you want to do is to split the row numbers to give the list of indices. Once you have dont this, you can 'lapply' this list of indices to a function. Once again I have to thank you, because I was able

Re: [R] rpvm/snow packages on a cluster with dual-processor machines

2006-08-11 Thread Paul Y. Peng
Hi Ramon, please let me know how you achieve this with rmpi. I use PVM simply because I picked it up first and it worked well for me. If MPI is the only way to make use the two processors, I will find out whether it is available or works in our cluster. Thanks a lot for your response. Regards,

Re: [R] rpvm/snow packages on a cluster with dual-processor machines

2006-08-11 Thread Ramon Diaz-Uriarte
Dear Paul, I have no direct experience with rpvm, but doing it with rmpi is a piece of cake. I could provide you with some hints if you want. (I am tempted to ask why you are using PVM instead of MPI, but this might be the wrong question). Best, R. On Friday 11 August 2006 18:12, Paul Y. Pen

[R] Getting summary.lm to include data for coefficients that are NAs?

2006-08-11 Thread r user
Is there a way to get the following code to include liens where the coefficients are “NA”? ((summary(reg))$coefficients) explanation: Using a loop, I am running regressions on several “subsets” of “data1”. “reg <- ( lm(lm(data1[,1] ~., data1[,2:l])) )” My regression has 10 independent variable

[R] rpvm/snow packages on a cluster with dual-processor machines

2006-08-11 Thread Paul Y. Peng
Hi, does anybody know how to use the dual processors in the machines of a cluster? I am using R with rpvm and snow packages. I usually start pvm daemon and add host machines first, and then run R to start my computing work. But I find that only one processor in each machine is used in this way

Re: [R] optim error

2006-08-11 Thread Rich Townsend
If you have an idea of the ranges of your parameters, I've found that the DEoptim package has been excellent for finding good starting values for very large likelihood equations, then finishing it up with the optim() to get the final estimates. Rich School of Aquatic & Fishery Sciences Universi

[R] Colour-coding intervals on a line

2006-08-11 Thread Sara-Jane Dunn
Hi, This is a simple version of something that I am trying to do. If I can sort the problem basically, I figure I should be able to sort it for the program I'm writing (which would take longer to explain). I need to know if there is any way of using different colours for different intervals of

Re: [R] [BioC] problem loading affycoretools (more details)

2006-08-11 Thread Jenny Drnevich
Hi again, I have been playing around with the order of loading packages, and as far as I can tell, there's nothing specific with affycoretools that's causing my Rgui to crash (i.e., shuts down and the Microsoft 'please send error report' box pops up). Instead, it has something to do with the or

Re: [R] logistic discrimination: which chance performance??

2006-08-11 Thread Frank E Harrell Jr
Bruno L. Giordano wrote: > Well, > If posting a possible solution to one's own problem is not part of the > netiquette of this list please correct me. > > Following Titus et al. (1984) one might use Cohen's kappa to have a > chance-corrected measure of agreement between the original and reproduced

[R] tkinsert

2006-08-11 Thread claude.josse
Dear List, I'm looking for some informations about the function "tkinsert()". I d'like to write lot of command in my text window and after to evaluate it with a button "Submit" for example, but i have some problems: here a exemple of my code: 1) My first problem tt=tktoplevel() txt=tktext(tt,h

Re: [R] graphic output file format

2006-08-11 Thread Jeffrey Horner
Luiz Rodrigo Tozzi wrote: > Hi > > I had some problems using GDD, especially with colors and with some advanced > plottings. > > In my case I didnt try the Cairo, I just got back to the png() using Xvfb > (its almost 3 or 4 times slower than my first tries qith GDD, but using GDD > would cause me

Re: [R] Suggestions for help & weighted.mean

2006-08-11 Thread Yan Wong
On 11 Aug 2006, at 12:49, Duncan Murdoch wrote: > It makes sense in this case, but in the case where there is more > than one infinite weight, the result has to be NaN. > ... it would be a lot more complicated if it were to handle this > very special case. Yes - I see that it may not be wort

Re: [R] help:coerce lmer.coef to matrix

2006-08-11 Thread Douglas Bates
On 8/11/06, Simon Pickett <[EMAIL PROTECTED]> wrote: > Hi, > Thanks for your response, it nearly worked! But it only wrote one coloumn > of data and not the three columns I need. > Using fixef(m1) doesnt give the same results as coef(m1) when you are > using more than one random effect. I need the

Re: [R] Running out of memory when using lapply

2006-08-11 Thread Seth Falcon
Hi Kamila, "Kamila Naxerova" <[EMAIL PROTECTED]> writes: > Hi all! > > I'm afraid I programmed something totally non-sensical and inefficient, > but I can't figure out how to do it better. > > I have a list of ~ 40 000 characters. I want to take each element at a > time, map it to a large data

[R] Is the PC1 in PCA always a "size effect"?

2006-08-11 Thread asako Ishii
Hi Im a beginner to R or statistics in general. I am comparing our products(6 in all) and competitive products(2). These products have a similar chemical formulation, but slightly different to each other. I chose the quantity of each chemicals as the variables and did a PCA to extract the char

[R] Is the PC1 in PCA always a "size effect"?

2006-08-11 Thread asako Ishii
Hi Im a beginner to R or statistics in general. I am comparing our products(6 in all) and competitive products(2). These products have a similar chemical formulation, but slightly different to each other. I chose the quantity of each chemicals as the variables and did a PCA to extract the char

Re: [R] bug in interaction order when using drop?

2006-08-11 Thread Petr Pikal
On 11 Aug 2006 at 12:31, Prof Brian Ripley wrote: Date sent: Fri, 11 Aug 2006 12:31:55 +0100 (BST) From: Prof Brian Ripley <[EMAIL PROTECTED]> To: Petr Pikal <[EMAIL PROTECTED]> Copies to: r-help@stat.math.ethz.ch Subject:

Re: [R] about MCMC pack again...

2006-08-11 Thread Mariagiulia Matteucci
Dear Harold, thank you very much. By the way, I know the article but my interest is more on the normal ogive model, and on the Inversion (probability integral transformation) method applied to the Gibbs sampler. If somebody knows something about it and about missing data in MCMC pack in R, please

Re: [R] Multiple density curves

2006-08-11 Thread Gabor Grothendieck
The code below was missing the breaks= argument to hist. I had not noticed because coincidentally both give the same breaks anways thus the following corrected version gives the same plot in this case but might not in other cases. # data DF <- structure(list(SEQ = structure(c(1, 2, 3, 4, 5, 6, 7,

Re: [R] Multiple density curves

2006-08-11 Thread Gabor Grothendieck
>From your description I assume you want both histograms and the densities all on the same chart. With existing R graphics I am not sure that there really is a simple way to do that. That aside, note that the hist function returns a list of components that includes - breaks, defining the breakpo

Re: [R] Suggestions for help & weighted.mean

2006-08-11 Thread Duncan Murdoch
Yan Wong wrote: > Hi, just a quick question: > > Should weighted.mean be able to cope with the specific case where one > weight is Inf? I came across this when trying to implement a simple > weighted moving average algorithm for surface smoothing: these > algorithms often result in a single i

Re: [R] bug in interaction order when using drop?

2006-08-11 Thread Prof Brian Ripley
On Thu, 10 Aug 2006, Petr Pikal wrote: > Ooops, my first suggestion reorders factor itself but > > if (drop) factor(ans) else ans > > instead of whole drop construction shall preserve levels order > without changing order of factor Even easier would be to return ans[,drop=drop]. It seems to m

Re: [R] Box's M test [Broadcast]

2006-08-11 Thread Liaw, Andy
Depends on how you look. Try RSiteSearch("Box's M Test") at the R prompt. Andy From: Wade Wall > > Hi all, > > Is there a box's M test for R? I have looked around, but have > been unable to find it. > > Thanks > Wade > > __ > R-help@stat.math.eth

Re: [R] about MCMC pack again...

2006-08-11 Thread Doran, Harold
Let's maybe back up a bit on this. You said you are interested in learning about the application of the Gibbs sampler for IRT models. I don't think opening the C++ code would be the best approach for this. Let me recommend the following article Patz, R. J., and Junker, B. W. (1999). A straig

[R] Suggestions for help & weighted.mean

2006-08-11 Thread Yan Wong
Hi, just a quick question: Should weighted.mean be able to cope with the specific case where one weight is Inf? I came across this when trying to implement a simple weighted moving average algorithm for surface smoothing: these algorithms often result in a single infinite weight when predict

[R] help:coerce lmer.coef to matrix

2006-08-11 Thread Simon Pickett
Hi, Thanks for your response, it nearly worked! But it only wrote one coloumn of data and not the three columns I need. Using fixef(m1) doesnt give the same results as coef(m1) when you are using more than one random effect. I need the coefficients for each individual so I use coef(m1) to get this

[R] Box's M test

2006-08-11 Thread Wade Wall
Hi all, Is there a box's M test for R? I have looked around, but have been unable to find it. Thanks Wade __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/po

[R] garch results is different other soft

2006-08-11 Thread Yong Xiao
Hi I compared garch results in R with those give by other software and found that their coefficients are different from each other. So I wondered that a convention the garch funcion in R takes. By testing the output, I noticed it seems that garch function in R by default takes such a convention: y(

Re: [R] How to speed up nested for loop computations

2006-08-11 Thread jim holtman
In your split, you used the dataframe. What you want to do is to split the row numbers to give the list of indices. Once you have dont this, you can 'lapply' this list of indices to a function. The one that I have below will return the index of the minimum of 'best' in each partition. You can t

Re: [R] help: convert lmer.coef to matrix

2006-08-11 Thread Bernd Weiss
On 11 Aug 2006 at 10:33, Simon Pickett wrote: Date sent: Fri, 11 Aug 2006 10:33:46 +0100 (BST) From: "Simon Pickett" <[EMAIL PROTECTED]> To: r-help@stat.math.ethz.ch Subject:[R] help: convert lmer.coef to matrix > Hi all, > I am t

Re: [R] about MCMC pack again...

2006-08-11 Thread Mariagiulia Matteucci
Hello, I am using Windows, I tried to use th File Search and also the Windows Grep but I cannot find any file! In the list you showed me there are some useful , I really don't know how can I find them! I tried in the R folder, src folder, MCMC pack folder and I dowloaded the .tar file about MCMC pa

Re: [R] Linear Trend in Residuals From lme

2006-08-11 Thread i.m.s.white
As an extreme example of this sort of thing, consider fit <- lme(y ~ 1, random = ~ 1 | group) where there is exactly one observation per group, so that it is not possible to get separate estimates of group and residual variances. Despite this, lme often (always?) provides a solution consistent w

[R] help: convert lmer.coef to matrix

2006-08-11 Thread Simon Pickett
Hi all, I am trying to coerce the coeficients from a REML using lmer() to a matrix of numbers which I can then write into excel. I have looked in the archive and read around in the (Matrix) documentation but havent found anything of use. Any suggestions much appreciated, Thankyou, S. Simon Picke

Re: [R] extractAIC using surf.ls

2006-08-11 Thread Yan Wong
On 11 Aug 2006, at 08:17, Prof Brian Ripley wrote: > Roger, thank you for looking into this. Yes, and thanks to both of you for the corrections. > However, the posting guide asked the poster to contact the > maintainer. Had > (s)he done so, I would have pointed out that spatial 7.28-2 (the

Re: [R] about MCMC pack again...

2006-08-11 Thread Barry Rowlingson
Mariagiulia Matteucci wrote: > Hello, thank you very much for your previous answers about the C++ code. > I am interested in the application of the Gibbs Sampler in the IRT > models, so in the function MCMCirt1d and MCMCirtkd. I've found the C++ > source codes, as you suggested, but I cannot find a

Re: [R] - factanal scores correlated?

2006-08-11 Thread Prof Brian Ripley
This is a Heywood case, and you don't have a valid fit: > myfac Call: factanal(x = m1, factors = 3, scores = "regression") Uniquenesses: v1v2v3v4v5v6 0.005 0.101 0.005 0.224 0.084 0.005 notice no less than 3 very small uniquenesses. On Fri, 11 Aug 2006, Christian Mont

[R] about MCMC pack again...

2006-08-11 Thread Mariagiulia Matteucci
Hello, thank you very much for your previous answers about the C++ code. I am interested in the application of the Gibbs Sampler in the IRT models, so in the function MCMCirt1d and MCMCirtkd. I've found the C++ source codes, as you suggested, but I cannot find anything about the Gibbs Sampler. All

[R] RE : tcltk library on linux

2006-08-11 Thread Yohan CHOUKROUN
Thank you for your answer but I already use the .deb package. Also I have compiled the source code, but it is the same result... I have already the same error.. I 'm going to be crazy ;-) Has anyone got the same problem (and found the solution!) ? Thanks in advance Yohan -Message d'origine

Re: [R] extractAIC using surf.ls

2006-08-11 Thread Prof Brian Ripley
Roger, thank you for looking into this. However, the posting guide asked the poster to contact the maintainer. Had (s)he done so, I would have pointed out that spatial 7.28-2 (the current version for R-devel) has this corrected (in a slightly simpler way). On Thu, 10 Aug 2006, Roger Bivand wrot