[R] with for objects
Is there a form of with (or an equivalent function) that can be applied to objects? I'd like to be able to write something like (drawing from bioconductor + trellis as an example) xyplot(maA ~ maM | maPrintTip, object = swirl[,1]) which would be interpreted as xyplot(swirl[,[EMAIL PROTECTED] ~ swirl[,[EMAIL PROTECTED] | swirl[,[EMAIL PROTECTED]) (or even better, match functions not slots eg. as xyplot(maA(swirl[,1]) ~ maM(swirl[,1]) | maPrintTip(swirl[,1]))) If there isn't, can any one offer any tips on writing such a function. I presume I'd have to deparse the formula, match the text with the slots/methods of the function, create the appropriate call objects and then call them? Thanks for you help, Hadley __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Escape optimization
Hello, I'm using optim and I'd like to know if there is a way to escape the optimization process at a given time (for example by pressing some sequence on the keyboard) while retaining the optimization results achieved. I found this very useful using the Aptech GAUSS optimization module. Thanks Paolo __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Escape optimization
No, the status of the optimization is only in C code until the finish. Whyever would a partially run optimization be useful? You can arrange for your optimizand to record the latest set of parameters if you wish, and then just interrupt R in the usual way. Or you can set a limit on the number of iterations. On Sun, 30 Nov 2003, Paolo Tenconi wrote: I'm using optim and I'd like to know if there is a way to escape the optimization process at a given time (for example by pressing some sequence on the keyboard) while retaining the optimization results achieved. I found this very useful using the Aptech GAUSS optimization module. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] tcltk problem with Button-2
Gabor Grothendieck [EMAIL PROTECTED] writes: But if I simply replace Control-Button-1 with Button-2 in the tkbind command, i.e. the last line, then nothing happens when I press Button-2 (which I assume is the right mouse button). It's the middle button (Tk was designed for three-button mice). The right button is Button-3. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] box m-test in R , 2nd
Hi all, For the box m-test i found a matlab script for the box m-test. i converted it to R and it seems to run so far with the testdata from the author. I am not a statistician, so for me it would be helpfull if somebody can supply me with data and the output, so i can check it further. when i have the permission from the author (i asked him this morning by E-mail) i will share it, if there are people who wants to test and use it. thanks Nicolaas Busscher -- Dr.Nicolaas Busscher Universität GH Kassel Nordbahnhofstrasse: 1a, D-37213 Witzenhausen Phone: 0049-(0)5542-98-1715, Fax: 0049-(0)5542-98-1713 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Discovering methods
On Fri, 28 Nov 2003, Gabor Grothendieck wrote: Sure, but why are some methods found using methods(POSIXct) while other methods not found? It would be nice to have some reliable documentation-independent way to discover all the methods for a class. Indeed it would, but that requires registration of methods using either the S4 approach or the functions for handling S3 methods in namespaces. Without this, it is simply not possible to decide, for example, whether t.test.formula is a method for t() or for t.test() or a separate function. -thomas __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] fitting a theoretical distribution with truncated tails
Hi, I have recently started working with R and am not really fluent in it. I am plotting a few graphs using the qqplot function. Is there a method for fitting a theoretical distribution (e.g Weibull) with truncated tails in R? Thanks for any help! Piyush __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] fitting a theoretical distribution with truncated tails
Have you considered fitdistr? The documentation says that the second argument is Either a character string or a function returning a density evaluated at its first argument. It should be easy enough to write something like the following: dweibull.trunc - function(x, shape, scale=1, trunc.=Inf, log=FALSE){ ln.dens - (dweibull(x, shape, scale, log=TRUE) -pweibull(trunc., shape, scale = 1, lower.tail = TRUE, log.p = TRUE)) if(any(oops - (xtrunc.))) ln.dens[oops] - (-Inf) if(log)ln.dens else exp(ln.dens) } x - rweibull(100, 1) range(x) x4 - x[x=4] fitdistr(x4, dweibull.trunc, start=list(shape=1, scale=1), trunc=4) If you want to estimate the truncation point, that will be a more difficult problem. For that, I suggest you compute the max of your data and parameterize the truncated density with a parameter like log.trunc.over.max so trunc. in the above example is computed as (max+exp(log.trunc.over.max)). hope this helps. spencer graves Piyush Sharma wrote: Hi, I have recently started working with R and am not really fluent in it. I am plotting a few graphs using the qqplot function. Is there a method for fitting a theoretical distribution (e.g Weibull) with truncated tails in R? Thanks for any help! Piyush __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Discovering methods
Thanks. I guess we have to be content to approximate this via: apropos(POSIXt$|POSIXct$) although this supposes we know that POSIXct inherits from POSIXt and its not clear that there is a reliable way to discover that for S3 classes. --- Date: Sun, 30 Nov 2003 13:10:52 -0800 (PST) From: Thomas Lumley [EMAIL PROTECTED] To: Gabor Grothendieck [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [R] Discovering methods On Fri, 28 Nov 2003, Gabor Grothendieck wrote: Sure, but why are some methods found using methods(POSIXct) while other methods not found? It would be nice to have some reliable documentation-independent way to discover all the methods for a class. Indeed it would, but that requires registration of methods using either the S4 approach or the functions for handling S3 methods in namespaces. Without this, it is simply not possible to decide, for example, whether t.test.formula is a method for t() or for t.test() or a separate function. -thomas __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Discovering methods
On Sun, 30 Nov 2003 20:55:49 -0500 (EST), you wrote: Thanks. I guess we have to be content to approximate this via: apropos(POSIXt$|POSIXct$) although this supposes we know that POSIXct inherits from POSIXt and its not clear that there is a reliable way to discover that for S3 classes. I don't think there's a concept of inheritance of classes in S3. That's one of the advantages of S4. Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] hdf library for windows
Hi, Is there a version of the hdf library for windows? Cheers Toby __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] hdf library for windows
The question puzzled me at first, because of your use of library. It looks as if the hdf5 r package utilises the windows hdf5 library binary. My reading is that you will have to compile the package yourself after you have downloaded the hdf windows dll from hdf.ncsa.uiuc.edu The instructions are in win.readme.txt of the package source which you can download at planetmirror or aarnet. I think the use of the hdf dll is the reason a windows binary cannot be made available for direct download. Ciao, Tom _ Tom Mulholland Senior Policy Officer WA Country Health Service Tel: (08) 9222 4062 The contents of this e-mail transmission are confidential an...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] strptime Usage
Thanks! On Wed, 26 Nov 2003, Gabor Grothendieck wrote: Date: Wed, 26 Nov 2003 00:34:11 -0500 (EST) From: Gabor Grothendieck [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [R] strptime Usage strptime takes a character input and produces a POSIXlt output so the format you specify to strptime is the format of the input, not the output: format( strptime(10/22/1986, %m/%d/%Y), %Y-%m ) It worked perfect. Just out of interest, if I want to convert (either from the original form, i.e. mm/dd/, or the -mm form, to quarterly format, e.g.: 1999-1 1999-2 1999-3 1999-4 is it possible to do with strptime? Or do I have to do something creative? ;-D -- Cheers, Kevin --- Try not. Do, do! Or do not. There is no try Jedi Master Yoda Ko-Kang Kevin Wang Master of Science (MSc) Student SLC Tutor and Lab Demonstrator Department of Statistics University of Auckland New Zealand Homepage: http://www.stat.auckland.ac.nz/~kwan022 Ph: 373-7599 x88475 (City) x88480 (Tamaki) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help