[R] unscrible pls

From: <xz44_at_drexel.edu>
Date: Wed, 02 May 2007 21:39:39 -0400


On 5/2/07, r-help-request_at_stat.math.ethz.ch < r-help-request_at_stat.math.ethz.ch> wrote:
>
> Send R-help mailing list submissions to
> r-help_at_stat.math.ethz.ch
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://stat.ethz.ch/mailman/listinfo/r-help
> or, via email, send a message with subject or body 'help' to
> r-help-request_at_stat.math.ethz.ch
>
> You can reach the person managing the list at
> r-help-owner_at_stat.math.ethz.ch
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-help digest..."
>
>
> Today's Topics:
>
> 1. Re: impossible to open SPSS file (Frank Thomas)
> 2. Problem with the installation of "install R" on Sun Solaris
> (Vipin Singhal)
> 3. Re: Concepts question: environment, frame, search path
> (Duncan Murdoch)
> 4. adding column to a matrix (raymond chiruka)
> 5. Re: intersect filled.contour and polygon (Roger Bivand)
> 6. Re: to draw a smooth arc (Jim Lemon)
> 7. Odp: adding column to a matrix (Petr PIKAL)
> 8. Re: Problem with the installation of "install R" on Sun
> Solaris (Prof Brian Ripley)
> 9. Re: Problem with the installation of "install R" on Sun
> Solaris (Peter Dalgaard)
> 10. Re: to draw a smooth arc (Prof Brian Ripley)
> 11. Re: Independent contrasts from lme with interactions (Kuhn, Max)
> 12. Re: thousand separator (was RE: weight) (John Kane)
> 13. Re: Problem with the installation of "install R" on Sun
> Solaris (JONATHAN BUTCHAR)
> 14. Re: to draw a smooth arc ( (Ted Harding))
> 15. Polar graph of time and tide (Alan E. Davis)
> 16. Re: to draw a smooth arc (Greg Snow)
> 17. Re: Polar graph of time and tide (Earl F. Glynn)
> 18. creating eps files (Tak Wing Chan)
> 19. Re: to draw a smooth arc (Greg Snow)
> 20. Re: creating eps files (Prof Brian Ripley)
> 21. Re: Concepts question: environment, frame, search path
> (Prof Brian Ripley)
> 22. logrank test (raymond chiruka)
> 23. Re: logrank test (Peter Dalgaard)
> 24. Re: logrank test (Marc Schwartz)
> 25. Re: logrank test (Roland Rau)
> 26. Re: to draw a smooth arc (Prof Brian Ripley)
> 27. linout=TRUE in nnet package ? (sj)
> 28. Re: logrank test (Roland Rau)
> 29. Matrix column name (alex lam (RI))
> 30. Simulation using parts of density function (Th?r Brigitte)
> 31. Simulation using parts of density function (Th?r Brigitte)
> 32. Re: Matrix column name (Marc Schwartz)
> 33. calculating area under the ROC curve (John Christie)
> 34. Re: to draw a smooth arc (Paulo Barata)
> 35. sorting in barplot (Romain.Mayor_at_ville-ge.ch)
> 36. Re: sorting in barplot (Marc Schwartz)
> 37. Re: Simulation using parts of density function ( (Ted Harding))
> 38. Free Webinar: Vendor Neutral Intro to Data Mining for
> Absolute Beginners, May 23, 2007 (Lisa Solomon)
> 39. Re: to draw a smooth arc (Paul Murrell)
> 40. Re: Matrix column name (Prof Brian Ripley)
> 41. to calculate sums (Pedro Sobral)
> 42. dlda{supclust} 's output (Weiwei Shi)
> 43. Re: to draw a smooth arc (Paulo Barata)
> 44. Re: to draw a smooth arc (Paul Murrell)
> 45. Percentage area of a distribution (Alan Gibson)
> 46. Re: Percentage area of a distribution (Alan Gibson)
> 47. optimising fitted distributions (Floris Van Ogtrop)
> 48. ED50 from logistic model with interactions (Kate Stark)
> 49. Re: Concepts question: environment, frame, search path
> (graham wideman)
> 50. the Surv function (Jennifer Dillon)
> 51. Re: the Surv function (Christos Hatzis)
> 52. ? R 2.5.0 alpha bug (Inman, Brant A. M.D.)
> 53. Warnings in package dependencies and /src contains object
> files. (Steve Su)
> 54. Re: ED50 from logistic model with interactions (Berwin A Turlach)
> 55. Re: Simulation using parts of density function (Th?r Brigitte)
> 56. Re: Simulation using parts of density function (Th?r Brigitte)
> 57. Log-likelihood function (Doxastic)
> 58. Get the difference of values to their own median value
> (Felix Wave)
> 59. Re: Simulation using parts of density function (Prof Brian Ripley)
> 60. missing package (raymond chiruka)
> 61. Re: Log-likelihood function (Prof Brian Ripley)
> 62. Re: ? R 2.5.0 alpha bug (Stefan Grosse)
> 63. Re: Simulation using parts of density function ( (Ted Harding))
> 64. hello (elyakhlifi mustapha)
> 65. Re: Log-likelihood function (Doxastic)
> 66. Re: missing package (John Kane)
> 67. missing values (elyakhlifi mustapha)
> 68. Re: missing package (Petr Klasterecky)
> 69. length of the object is not a multiple of... [was: Re: hello]
> (Petr Klasterecky)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 01 May 2007 12:15:50 +0200
> From: Frank Thomas <news.ftr_at_free.fr>
> Subject: Re: [R] impossible to open SPSS file
> To: "r-help_at_stat.math.ethz.ch" <r-help_at_stat.math.ethz.ch>
> Message-ID: <46371356.5070802@free.fr>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> David Barron gave me a good tip that I had not seen:
> > Have a look at FAQ 2.16 in the R for Windows FAQ.
>
>
> Knut Krueger wrote:
> > My workaround for that problem is to build the data sheet in Excel and
> > import it to SPSS and R.
> > Or to export the SPSS sheet to CSV (or maybe if it is possible to
> > Excel) and import it to R
> > SPSS does not externalize the data format :-(
> > Regards Knut
> >
> We don't have SPSS so unfortunately this work around is not possible.
>
> Thank you both,
> Frank
>
>
> --
> ..........................................
> Dr. Frank Thomas
> FTR Internet Research
> 93110 Rosny-sous-Bois
> France
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 1 May 2007 16:39:00 +0530
> From: "Vipin Singhal" <Vipin.Singhal_at_symphonysv.com>
> Subject: [R] Problem with the installation of "install R" on Sun
> Solaris
> To: <R-help_at_stat.math.ethz.ch>
> Message-ID:
> <11E5F68D25F56948B8ADC29D0773DCC787B422@BLR2K3EXCL01.symphonysv.com
> >
> Content-Type: text/plain; charset="us-ascii"
>
> An embedded and charset-unspecified text was scrubbed...
> Name: config.txt
> Url:
> https://stat.ethz.ch/pipermail/r-help/attachments/20070501/bdf55878/attachment-0001.txt
>
> ------------------------------
>
> Message: 3
> Date: Tue, 01 May 2007 07:16:26 -0400
> From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
> Subject: Re: [R] Concepts question: environment, frame, search path
> To: Graham Wideman <gwlist_at_grahamwideman.com>
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <4637218A.4090500@stats.uwo.ca>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 01/05/2007 12:29 AM, Graham Wideman wrote:
> > Folks:
> >
> > I'd appreciate if someone could straighten me out on a few concepts
> which
> > are described a bit ambiguously in the docs.
> >
> > 1. data.frame:
> > ----------------
> > Refan p84: 'A data frame is a list of variables of the same length with
> > unique row names, given class "data.frame".'
> >
> > I probably don't need to point out how opaque that is!
>
> Which manual are you looking at? The "reference index" (refman.pdf)? It
> doesn't usually include statements like that; they are usually found in
> the Introduction to R (R-intro.pdf) or the R Language Definition
> (R-lang.pdf). But since the refman is just a collection of man pages,
> it might be in there somewhere. And since the manuals do get updated,
> that statement may not be present in the current release. (I did a
> quick search of the source, and couldn't spot it, but my search might
> have failed because of line breaks, strange formatting, or looking in
> the wrong place.)
>
> By the way, it's generally best to cite the section name where you found
> a quote, because the pagination varies from system to system. Even
> better would be to give a URL to the online HTML version at
> http://cran.r-project.org/manuals.html.
>
> For future reference, if you are suggesting a change, it's best to cite
> the line number in the source at
> https://svn.r-project.org/R/trunk/doc/manual in the *.texi files or
> https://svn.r-project.org/R/trunk/src/library/*/man/*.Rd for man pages,
> and send such suggestions to the R-devel list.
>
> > Anyhow, key question: Some places in the docs seem pretty firm that a
> > data.frame is basically a 2-D array with:
> > a) named rows and
> > b) columns whose items within a column be of uniform data type.
> >
> > Elsewhere, it seems like a data.frame can be a collection of arbitrary
> > variables.
>
> The former interpretation is correct. Since the variables all have the
> same length, things like df[i, j] make sense: they choose the i'th
> entry from the j'th variable (according to the "refan" definition), or
> the i'th row, j'th column (according to the 2-D array interpretation.
> >
> > 2. environment
> > ---------------
> > Refman p122: "Environments consist of a frame, or collection of named
> > objects, and a pointer to an enclosing environment."
> >
> > Is the "or" here explaining parenthetically that a frame is a collection
> of
> > named objects, or is separating too alternative structures for an
> > environment?
>
> The former.
> >
> > If the former, does this imply that a frame can contain arbitrary
> variables?
>
> Yes, but a frame isn't an R object, it's a concept that appears in
> descriptions, e.g. part of an environment, or the local variables
> created during function evaluation, etc.
> >
> > And "pointer"? Is that a type of thing in R?
>
> No, there are no pointers in R. There are a couple of tricks to fake
> them (e.g. environment objects aren't copied when assigned, you just get
> a new reference to the same environment; this allows you to construct
> something like a pointer by wrapping an object in an environment), but I
> don't recommend using these routinely.
>
> >
> > 3. R search path; attach()
> > ----------------------------
> > The R search path appears to hold the list of "collections of data" (my
> > term) that can be accessed by a users' commands. Refman p27 tells that
> > search path can hold items that are data.frame, list, environment or R
> data
> > file (on disk). Yet R-intro p28 describes attach() as taking a
> "directory
> > name" argument. What is the concept "directory" in this context?
>
> I haven't read the preceding pages carefully, but that looks like an
> error. The usual argument to attach is a package name, and what gets
> attached is an environment holding the exports from the package.
> Packages are stored in directories in the file system, so maybe that's
> what the author of that line had in mind.
>
> Duncan Murdoch
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 1 May 2007 04:25:18 -0700 (PDT)
> From: raymond chiruka <rtchiruka_at_yahoo.com>
> Subject: [R] adding column to a matrix
> To: r <r-help_at_stat.math.ethz.ch>
> Message-ID: <142954.90575.qm@web33005.mail.mud.yahoo.com>
> Content-Type: text/plain
>
> l have the following dataset and would like to calculate the actual
> survival time by
> if censoring time > survival time then actual survival time =survival time
> else its= censoring time.
> treatmentgrp strata censoringTime survivalTime censoring
> actualsurvivaltim
> [1,] 1 1 1.012159 1137.80922
> 0
> [2,] 2 2 32.971439 247.21786
> 0
> [3,] 2 1 85.758253 797.04949
> 0
> [4,] 1 1 16.999171 78.92309
> 0
>
> l used matrix to genarate the data
> thanks in advance
>
>
>
> ---------------------------------
>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 1 May 2007 13:39:37 +0200 (CEST)
> From: Roger Bivand <Roger.Bivand_at_nhh.no>
> Subject: Re: [R] intersect filled.contour and polygon
> To: Pedro Mardones <mardones.p_at_gmail.com>
> Cc: R-help_at_stat.math.ethz.ch
> Message-ID: <Pine.LNX.4.44.0705011333180.20752-100000@reclus.nhh.no>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> On Mon, 30 Apr 2007, Pedro Mardones wrote:
>
> > Dear R users;
> >
> > Is there any way to intersect a filled contour image and a polygon? My
> > problem is that I want to create a kriging map and the boundaries of
> > my map are given by the coordinates of the polygon.
> >
> > So far I can superompose the polygon in the filled.contour image but I
> > don't know how to get rid of the contour image outside of the polygon
> > boundaries.
>
> Two possibilities seem to be present: define your polygon as a hole inside
> the bounding box of the image, with a link between the polygon and the
> bounding box, and fill it; or, perhaps better, only make kriging
> predictions for the polygon. Since you haven't given a code example, it
> isn't obvious how you are making the kriging predictions, but the choice
> of the newdata locations ought to decide - and they do not need to be a
> full grid, or even a regular grid at all.
>
> If you need to follow this up, please consider using the R-sig-geo list.
>
> >
> > Any hint will be appreciated
> > PM
> >
> > ______________________________________________
> > R-help_at_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/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> --
> Roger Bivand
> Economic Geography Section, Department of Economics, Norwegian School of
> Economics and Business Administration, Helleveien 30, N-5045 Bergen,
> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand_at_nhh.no
>
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 01 May 2007 21:50:14 +1000
> From: Jim Lemon <jim_at_bitwrit.com.au>
> Subject: Re: [R] to draw a smooth arc
> To: pbarata_at_infolink.com.br
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <46372976.2040103@bitwrit.com.au>
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
> Paulo Barata wrote:
> > Dear R-list members,
> >
> > I would like to draw a smooth arc. I can draw an arc
> > parametrically, but this produces an arc too coarse,
> > even allowing for different increments in sequence t
> > in the example below. Function "symbols" (graphics) does
> > produce a smooth circle, but it cannot produce an arc.
> >
> > Please see the following example, drawing complete circles:
> >
> > plot(-5:5,-5:5,type='n')
> > ## draws circle with function symbols (package graphics)
> > ## - inner circle is very smooth:
> > symbols(0,0,circles=2,add=TRUE)
> > ## draws circle parametrically - outer circle is too coarse:
> > pi <- 4*atan(1)
> > t <- seq(0,2*pi,0.02)
> > lines(4*cos(t),4*sin(t))
> >
> > Package "plotrix" has a function "draw.arc", but arcs produced
> > with this function are also either too coarse or too polygonal,
> > depending on the number of polygons used to approximate the arc.
> >
> > Is there a way to harness the characteristics of function
> > "symbols" (graphics) to draw a smooth arc, not just a complete
> > circle?
> >
> Hi Paulo,
> I may be misunderstanding you, but have you tried to increase the number
> of segments in the arc using the "n" argument?
>
> draw.arc(1,1,1,n=100)
>
> Jim
>
>
>
> ------------------------------
>
> Message: 7
> Date: Tue, 1 May 2007 13:50:30 +0200
> From: Petr PIKAL <petr.pikal_at_precheza.cz>
> Subject: [R] Odp: adding column to a matrix
> To: raymond chiruka <rtchiruka_at_yahoo.com>
> Cc: r <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <
> OF3C24AA82.42D08B37-ONC12572CE.0040EADC-C12572CE.00410C9B_at_precheza.cz>
>
> Content-Type: text/plain; charset="US-ASCII"
>
> Hi
>
> see ?ifelse
>
> ifelse(censoring>survival, survival, censoring)
>
> Regards
>
> Petr
> petr.pikal_at_precheza.cz
>
> r-help-bounces_at_stat.math.ethz.ch napsal dne 01.05.2007 13:25:18:
>
> > l have the following dataset and would like to calculate the actual
> survival time by
> > if censoring time > survival time then actual survival time =survival
> time
> > else its= censoring time.
> > treatmentgrp strata censoringTime survivalTime censoring
>
> > actualsurvivaltim
> > [1,] 1 1 1.012159 1137.80922 0
> > [2,] 2 2 32.971439 247.21786 0
> > [3,] 2 1 85.758253 797.04949 0
> > [4,] 1 1 16.999171 78.92309 0
> >
> > l used matrix to genarate the data
> > thanks in advance
> >
> >
> >
> > ---------------------------------
> >
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help_at_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/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
>
>
> ------------------------------
>
> Message: 8
> Date: Tue, 1 May 2007 12:59:37 +0100 (BST)
> From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
> Subject: Re: [R] Problem with the installation of "install R" on Sun
> Solaris
> To: Vipin Singhal <Vipin.Singhal_at_symphonysv.com>
> Cc: R-help_at_stat.math.ethz.ch
> Message-ID: <Pine.LNX.4.64.0705011254340.20705@gannet.stats.ox.ac.uk>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> R has a file INSTALL which asks you to read R-admin.html if you have a
> problem. That manual explains that you need a C (preferably C99) and a
> Fortran compiler. This extensive posting merely says that you don't have
> a C compiler in your path. That's not something we can help you with.
> (Lots of other tools are missing as well.)
>
> On Tue, 1 May 2007, Vipin Singhal wrote:
>
> > This file contains any messages produced by compilers while
> > running configure, to aid debugging if configure makes a mistake.
> >
> > It was created by R configure 2.4.1, which was
> > generated by GNU Autoconf 2.59. Invocation command line was
> >
> > $ ./configure
>
> [...]
>
> > configure:4013: error: no acceptable C compiler found in $PATH
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> 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, UK Fax: +44 1865 272595
>
>
>
> ------------------------------
>
> Message: 9
> Date: Tue, 01 May 2007 14:13:22 +0200
> From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
> Subject: Re: [R] Problem with the installation of "install R" on Sun
> Solaris
> To: Vipin Singhal <Vipin.Singhal_at_symphonysv.com>
> Cc: R-help_at_stat.math.ethz.ch
> Message-ID: <46372EE2.6000700@biostat.ku.dk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Vipin Singhal wrote:
>
> (nothing, except for an attached file)
>
> configure:3749: checking for gcc
> configure:3778: result: no
> configure:3829: checking for cc
> configure:3858: result: no
> configure:3871: checking for cc
> configure:3917: result: no
> configure:3970: checking for cl
> configure:3999: result: no
> configure:4013: error: no acceptable C compiler found in $PATH
> See `config.log' for more details.
>
> Which part of this is it that you have trouble understanding?
>
>
>
> ------------------------------
>
> Message: 10
> Date: Tue, 1 May 2007 13:41:11 +0100 (BST)
> From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
> Subject: Re: [R] to draw a smooth arc
> To: Jim Lemon <jim_at_bitwrit.com.au>
> Cc: r-help_at_stat.math.ethz.ch, pbarata_at_infolink.com.br
> Message-ID: <Pine.LNX.4.64.0705011337500.21493@gannet.stats.ox.ac.uk>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Tue, 1 May 2007, Jim Lemon wrote:
>
> > Paulo Barata wrote:
> >> Dear R-list members,
> >>
> >> I would like to draw a smooth arc. I can draw an arc
> >> parametrically, but this produces an arc too coarse,
> >> even allowing for different increments in sequence t
> >> in the example below. Function "symbols" (graphics) does
> >> produce a smooth circle, but it cannot produce an arc.
> >>
> >> Please see the following example, drawing complete circles:
> >>
> >> plot(-5:5,-5:5,type='n')
> >> ## draws circle with function symbols (package graphics)
> >> ## - inner circle is very smooth:
> >> symbols(0,0,circles=2,add=TRUE)
> >> ## draws circle parametrically - outer circle is too coarse:
> >> pi <- 4*atan(1)
> >> t <- seq(0,2*pi,0.02)
> >> lines(4*cos(t),4*sin(t))
> >>
> >> Package "plotrix" has a function "draw.arc", but arcs produced
> >> with this function are also either too coarse or too polygonal,
> >> depending on the number of polygons used to approximate the arc.
> >>
> >> Is there a way to harness the characteristics of function
> >> "symbols" (graphics) to draw a smooth arc, not just a complete
> >> circle?
> >>
> > Hi Paulo,
> > I may be misunderstanding you, but have you tried to increase the number
> > of segments in the arc using the "n" argument?
> >
> > draw.arc(1,1,1,n=100)
>
> Put it another way, drawing arcs is not a primitive in the R graphics
> system but drawing circles is. So there is no low-level way to draw an
> arc of a circle except via line segments. (Quite a few graphics devices
> draw circles via line segments, but not all and vector-graphics systems
> like postscript can often do better.)
>
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> 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, UK Fax: +44 1865 272595
>
>
>
> ------------------------------
>
> Message: 11
> Date: Tue, 1 May 2007 08:44:59 -0400
> From: "Kuhn, Max" <Max.Kuhn_at_pfizer.com>
> Subject: Re: [R] Independent contrasts from lme with interactions
> To: "Ken Nussear" <knussear_at_usgs.gov>, <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <
> 71257D09F114DA4A8E134DEAC70F25D3083B819A_at_groamrexm03.amer.pfizer.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Ken,
>
> Take a look at the just released contrast package.
>
> Max
>
>
> -----Original Message-----
> From: r-help-bounces_at_stat.math.ethz.ch
> [mailto:r-help-bounces_at_stat.math.ethz.ch] On Behalf Of Ken Nussear
> Sent: Monday, April 30, 2007 6:12 PM
> To: r-help_at_stat.math.ethz.ch
> Subject: [R] Independent contrasts from lme with interactions
>
> Hi All,
>
> I've been searching the help archives but haven't found a workable
> solution to this problem.
>
> I'm running an lme model with the following call:
>
> >lme.fnl <- lme(Max ~ S + Tr + Yr + Tr:Yr, random = ~1 |TID)
> > anova(lme.fnl)
> numDF denDF F-value p-value
> (Intercept) 1 168 19255.389 <.0001
> S 1 168 5.912 0.0161
> Tr 2 116 15.919 <.0001
> Yr 1 168 77.837 <.0001
> Tr:Yr 2 168 47.584 <.0001
>
>
> >summary(lme.fnl)
> Linear mixed-effects model fit by REML
> Data: NULL
> AIC BIC logLik
> 580.6991 613.5399 -281.3496
>
> Random effects:
> Formula: ~1 | TID
> (Intercept) Residual
> StdDev: 0.3697006 0.5316062
>
> Fixed effects: Max ~ S + Tr + Yr + Tr:Yr
> Value Std.Error DF t-value p-value
> (Intercept) -13.5681 113.2623 168 -0.119793 0.9048
> SM 0.2187 0.0957 168 2.284605 0.0236
> TrT97 1375.5897 164.0060 116 8.387434 0.0000
> TrT98 2890.9462 455.3497 116 6.348848 0.0000
> Yr 0.0099 0.0567 168 0.174005 0.8621
> TrT97:Yr -0.6883 0.0821 168 -8.384798 0.0000
> TrT98:Yr -1.4463 0.2279 168 -6.347310 0.0000
> Correlation:
> (Intr) SM TrT97 TrT98 Yr TT97:Y
> SM 0.067
> TrT97 -0.691 -0.049
> TrT98 -0.248 -0.001 0.171
> Yr -1.000 -0.067 0.691 0.248
> TrT97:Yr 0.691 0.048 -1.000 -0.171 -0.691
> TrT98:Yr 0.248 0.001 -0.171 -1.000 -0.248 0.171
>
> Standardized Within-Group Residuals:
> Min Q1 Med Q3 Max
> -2.19017911 -0.58108001 -0.04983642 0.57323031 2.39811353
>
> Number of Observations: 291
> Number of Groups: 119
>
>
>
> I'm specifically interested in differences of in the differences
> between my treatment groups (3) and Year (Yr), and importantly in the
> interaction. Normally I'm used to running independent contrast
> analysis to explore these differences, but I'm not sure how to
> extract this information using lme. Can anyone point me in the right
> direction?
>
> Thanks
>
> Ken
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_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/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> ----------------------------------------------------------------------
> LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
>
>
>
> ------------------------------
>
> Message: 12
> Date: Tue, 1 May 2007 08:56:50 -0400 (EDT)
> From: John Kane <jrkrideau_at_yahoo.ca>
> Subject: Re: [R] thousand separator (was RE: weight)
> To: "Liaw, Andy" <andy_liaw_at_merck.com>, Gabor Grothendieck
> <ggrothendieck_at_gmail.com>
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <323675.20228.qm@web32808.mail.mud.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
>
>
> --- "Liaw, Andy" <andy_liaw_at_merck.com> wrote:
>
> > Looks very neat, Gabor!
> >
> > I just cannot fathom why anyone who want to write
> > numerics with those
> > separators in a flat file. That's usually not for
> > human consumption,
> > and computers don't need those separators!
> >
> > Andy
>
> It' often a case of taking what you can get. I've
> seem myself taking formatted numbers from report
> intended for reading and then cutting and pasting them
> into a text editor.
>
> > From: Gabor Grothendieck
> > >
> > > That could be accomplished using a custom class
> > like this:
> > >
> > > library(methods)
> > > setClass("num.with.junk")
> > > setAs("character", "num.with.junk",
> > > function(from) as.numeric(gsub(",", "", from)))
> > >
> > >
> > > ### test ###
> > >
> > > Input <- "A B
> > > 1,000 1
> > > 2,000 2
> > > 3,000 3
> > > "
> > > DF <- read.table(textConnection(Input), header =
> > TRUE,
> > > colClasses = c("num.with.junk", "numeric"))
> > > str(DF)
> > >
> > >
> > >
> > > On 4/30/07, Liaw, Andy <andy_liaw_at_merck.com>
> > wrote:
> > > > Still, though, it would be nice to have the data
> > read in
> > > correctly in
> > > > the first place, instead of having to do this
> > kind of
> > > post-processing
> > > > afterwards...
> > > >
> > > > Andy
> > > >
> > > > From: Bert Gunter
> > > > >
> > > > > Nothing! My mistake! gsub -- not sub -- is
> > what you want to
> > > > > get 'em all.
> > > > >
> > > > > -- Bert
> > > > >
> > > > >
> > > > > Bert Gunter
> > > > > Genentech Nonclinical Statistics
> > > > >
> > > > > -----Original Message-----
> > > > > From: r-help-bounces_at_stat.math.ethz.ch
> > > > > [mailto:r-help-bounces_at_stat.math.ethz.ch] On
> > Behalf Of
> > > Marc Schwartz
> > > > > Sent: Monday, April 30, 2007 10:18 AM
> > > > > To: Bert Gunter
> > > > > Cc: r-help_at_stat.math.ethz.ch
> > > > > Subject: Re: [R] thousand separator (was RE:
> > weight)
> > > > >
> > > > > Bert,
> > > > >
> > > > > What am I missing?
> > > > >
> > > > > > print(as.numeric(gsub(",", "",
> > "1,123,456.789")), 10)
> > > > > [1] 1123456.789
> > > > >
> > > > >
> > > > > FWIW, this is using:
> > > > >
> > > > > R version 2.5.0 Patched (2007-04-27 r41355)
> > > > >
> > > > > Marc
> > > > >
> > > > > On Mon, 2007-04-30 at 10:13 -0700, Bert Gunter
> > wrote:
> > > > > > Except this doesn't work for "1,123,456.789"
> > Marc.
> > > > > >
> > > > > > I hesitate to suggest it, but gregexpr()
> > will do it, as it
> > > > > captures the
> > > > > > position of **every** match to ",". This
> > could be then used
> > > > > to process the
> > > > > > vector via some sort of loop/apply
> > statement.
> > > > > >
> > > > > > But I think there **must** be a more elegant
> > way using
> > > > > regular expressions
> > > > > > alone, so I, too, await a clever reply.
> > > > > >
> > > > > > -- Bert
> > > > > >
> > > > > >
> > > > > > Bert Gunter
> > > > > > Genentech Nonclinical Statistics
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: r-help-bounces_at_stat.math.ethz.ch
> > > > > > [mailto:r-help-bounces_at_stat.math.ethz.ch] On
> > Behalf Of
> > > Marc Schwartz
> > > > > > Sent: Monday, April 30, 2007 10:02 AM
> > > > > > To: Liaw, Andy
> > > > > > Cc: r-help_at_stat.math.ethz.ch
> > > > > > Subject: Re: [R] thousand separator (was RE:
> > weight)
> > > > > >
> > > > > > One possibility would be to use something
> > like the following
> > > > > > post-import:
> > > > > >
> > > > > > > WTPP
> > > > > > [1] 1,106.8250 1,336.5138
> > > > > >
> > > > > > > str(WTPP)
> > > > > > Factor w/ 2 levels
> > "1,106.8250","1,336.5138": 1 2
> > > > > >
> > > > > > > as.numeric(gsub(",", "", WTPP))
> > > > > > [1] 1106.825 1336.514
> > > > > >
> > > > > >
> > > > > > Essentially strip the ',' characters from
> > the factors and
> > > > > then coerce
> > > > > > the resultant character vector to numeric.
> > > > > >
> > > > > > HTH,
> > > > > >
> > > > > > Marc Schwartz
> > > > > >
> > > > > >
> > > > > > On Mon, 2007-04-30 at 12:26 -0400, Liaw,
> > Andy wrote:
> > > > > > > I've run into this occasionally. My
> > current solution is
> > > > > simply to read
> > > > > > > it into Excel, re-format the offending
> > column(s) by
> > > unchecking the
> > > > > > > "thousand separator" box, and write it
> > back out. Not
> > > > > exactly ideal to
> > > > > > > say the least. If anyone can provide a
> > better solution
> > > > > in R, I'm all
> > > > > > > ears...
> > > > > > >
> > > > > > > Andy
> > > > > > >
> > > > > > > From: Natalie O'Toole
> > > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > These are the variables in my file. I
> > think the
> > > > > variable i'm having
> > > > > > > > problems with is WTPP which is of the
> > Factor type. Does
> > > > > > > > anyone know how to
> > > > > > > > fix this, please?
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > >
> > > > > > > > Nat
> > > > > > > >
> > > > > > > > data.frame': 290 obs. of 5 variables:
> > > > > > > > $ PROV : num 48 48 48 48 48 48 48 48
> > 48 48 ...
> > > > > > > > $ REGION: num 4 4 4 4 4 4 4 4 4 4 ...
> > > > > > > > $ GRADE : num 7 7 7 7 7 7 7 7 7 7 ...
> > > > > > > > $ Y_Q10A: num 1.1 1.1 1.1 1.1 1.1 1.1
> > 1.1 1.1 1.1 1.1 ...
> > > > > > > > $ WTPP : Factor w/ 1884 levels
> > > > > > > > "1,106.8250","1,336.5138",..: 1544 67
> > > > > > > > 1568 40 221 1702 1702 1434 310 310 ...
> > > > > > > >
> > > > > > > >
> > > > > > > > __________________
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --- Douglas Bates <bates_at_stat.wisc.edu>
> > wrote:
> > > > > > > >
> > > > > > > > > On 4/28/07, John Kane
> > <jrkrideau_at_yahoo.ca> wrote:
> >
> === message truncated ===
>
>
>
> ------------------------------
>
> Message: 13
> Date: Tue, 01 May 2007 08:57:21 -0400
> From: JONATHAN BUTCHAR <butchar.2_at_osu.edu>
> Subject: Re: [R] Problem with the installation of "install R" on Sun
> Solaris
> To: Vipin Singhal <Vipin.Singhal_at_symphonysv.com>
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <e3cf8ae3bcd0.e3bcd0e3cf8a@osu.edu>
> Content-Type: text/plain; charset="us-ascii"
>
> Greetings.
>
> It looks like your R config can't find your C compiler. Do you have /
> usr/ccs/bin in your path? Or, if you installed Studio 11, do you have
> /usr/ccs/bin and /opt/SUNWspro/bin in your path?
>
> Hope this helps,
>
> Jon
> -------------- next part --------------
> ______________________________________________
> R-help_at_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/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> ------------------------------
>
> Message: 14
> Date: Tue, 01 May 2007 14:50:48 +0100 (BST)
> From: (Ted Harding) <ted.harding_at_nessie.mcc.ac.uk>
> Subject: Re: [R] to draw a smooth arc
> To: r-help_at_stat.math.ethz.ch
> Message-ID: <XFMail.070501145048.ted.harding@nessie.mcc.ac.uk>
> Content-Type: text/plain; charset=iso-8859-1
>
> This thread prompts me to ask about something I've
> been pondering for a while, as to whether there's an
> implementation somewhere ticked away in the R resources.
>
> So far, people have been responding to the original query
> in terms of increasing the numbers of points, and joining
> these by lines.
>
> However, if you're using PostScript output, you can draw
> really smooth curves by exploiting PS's "curveto" operator.
> This draws a cubic-curve segment in the following way:
>
> The two points you want to join with a curve will be denoted
> by (X0,Y0) and (X3,Y3) in the following (for reasons which
> will appear). The PS command is of the form
>
> x1 y1 x2 y2 X3 Y3 curevto
>
> At (X0,Y0) the tangent to the curve (as it departs from (X0,Y0)
> is in the direction of the directed line from (X0,Y0) to (x1,y1),
> and at (X3,Y3) (as it arrives) the tangent to the curve is
> in the direction of the directed line from (x2,y3) to (X3,Y3).
>
> The location of (X0,Y0) is not part of the command, since
> it is implicit in the PS "currentpoint" which is the starting
> point of the curve.
>
> The result is (in theory, and in practice to within the resolution
> of the output device) a perfectly smooth curve, provided the
> consecutive cubic segments have the same tangent at each of
> the points being joined. This can be achieved by appropriate
> choice of the "intermediate" points -- (x1,y2), (x2,y2) above.
>
> So far, when I've done this myself (including when using the
> output from R to give the points being joined), I've done the
> computation of the "intermediate" points "by hand". This basically
> involves deciding, at each of the points being joined, what the
> tangent to the smooth curve shouold be.
>
> Of course, there is an element of arbitrariness in this, unless
> there is an analytic representation of the curve on which the
> points lie (e.g. you're plotting sin(x)/x every pi/8, and
> want to join them smoothly), when all you need is the derivatives
> at the points.
>
> Crudely, you might evaluate the direction at a point in terms
> os a weighted average of the directions to its two immediate
> neighbours (the nearer meghbour ges the greater weight); less
> crudely, you might fit a quadratic through the point and its
> 2 neighbours and use the gradient at the middle point; and so on.
>
> Once you've decided on the tangent at each point, it's then
> straightforward to compute suitable "intermediate points"
> to serve as (x1,y2) and (x2,y2).
>
> (One application where this sort of approach is needed is in
> joining computed points on iso-contours, where the individual
> points have been determined by interpolation of spot-measurements
> at nearby measuring stations).
>
> Anyway. The Question: is there a general function for the
> above kind of smooth curve-drawing?
>
> With thanks,
> Ted.
>
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <ted.harding_at_nessie.mcc.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 01-May-07 Time: 14:50:38
> ------------------------------ XFMail ------------------------------
>
>
>
> ------------------------------
>
> Message: 15
> Date: Wed, 2 May 2007 00:04:50 +1000
> From: "Alan E. Davis" <lngndvs_at_gmail.com>
> Subject: [R] Polar graph of time and tide
> To: r-help_at_stat.math.ethz.ch
> Message-ID:
> <7bef1f890705010704n491a34c6w91bd31ebe26bbdff@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I have been trying to visualize times of lowest tides, month by month.
> I have tide predictions with times either in unix time or a text
> format, and heights in feet or meters. I had been able to derive the
> clock times of each prediction. I would now like to graph this data
> with points showing heights as "r" and times as "theta", from 0000 to
> 2355. There is a seasonal component: I am interested in displaying
> times of lowest tides in particular.
>
> I am sure this is so simple as to burden those on the list; I however
> have spent two evenings trying to figure out how to use polar.plot,
> and I'm not sure that's the best way to do this. May I request some
> advice? The docs with polar.plot are not complete, I fear.
>
> Thank you, begging for your indulgence,
>
> Alan
>
> --
> Alan Davis, Kagman High School, Saipan lngndvs_at_gmail.com
>
>
> Every great advance in natural knowledge has involved the absolute
> rejection of authority. ----- Thomas H. Huxley
>
>
>
> ------------------------------
>
> Message: 16
> Date: Tue, 1 May 2007 08:53:54 -0600
> From: "Greg Snow" <Greg.Snow_at_intermountainmail.org>
> Subject: Re: [R] to draw a smooth arc
> To: ted.harding_at_manchester.ac.uk, r-help_at_stat.math.ethz.ch
> Message-ID:
> <07E228A5BE53C24CAD490193A7381BBB9727A3@LP-EXCHVS07.CO.IHC.COM>
> Content-Type: text/plain; charset=us-ascii
>
> There is the grid.xspline function in the grid package that allows for
> things like this (the control points, though more general than what you
> state). I don't know if it uses the postscript curveto, or approximates
> using line segments.
>
> You can also use the xfig device, then use xfig, winfig, or jfig to
> explicitly convert any polylines to xslpines, adjust any parameters of
> the spline that you want, then export to other formats.
>
> Hope this helps,
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.snow_at_intermountainmail.org
> (801) 408-8111
>
>
>
> > -----Original Message-----
> > From: r-help-bounces_at_stat.math.ethz.ch
> > [mailto:r-help-bounces_at_stat.math.ethz.ch] On Behalf Of
> > ted.harding_at_nessie.mcc.ac.uk
> > Sent: Tuesday, May 01, 2007 7:51 AM
> > To: r-help_at_stat.math.ethz.ch
> > Subject: Re: [R] to draw a smooth arc
> >
> > This thread prompts me to ask about something I've been
> > pondering for a while, as to whether there's an
> > implementation somewhere ticked away in the R resources.
> >
> > So far, people have been responding to the original query in
> > terms of increasing the numbers of points, and joining these by lines.
> >
> > However, if you're using PostScript output, you can draw
> > really smooth curves by exploiting PS's "curveto" operator.
> > This draws a cubic-curve segment in the following way:
> >
> > The two points you want to join with a curve will be denoted
> > by (X0,Y0) and (X3,Y3) in the following (for reasons which
> > will appear). The PS command is of the form
> >
> > x1 y1 x2 y2 X3 Y3 curevto
> >
> > At (X0,Y0) the tangent to the curve (as it departs from
> > (X0,Y0) is in the direction of the directed line from (X0,Y0)
> > to (x1,y1), and at (X3,Y3) (as it arrives) the tangent to the
> > curve is in the direction of the directed line from (x2,y3)
> > to (X3,Y3).
> >
> > The location of (X0,Y0) is not part of the command, since it
> > is implicit in the PS "currentpoint" which is the starting
> > point of the curve.
> >
> > The result is (in theory, and in practice to within the
> > resolution of the output device) a perfectly smooth curve,
> > provided the consecutive cubic segments have the same tangent
> > at each of the points being joined. This can be achieved by
> > appropriate choice of the "intermediate" points -- (x1,y2),
> > (x2,y2) above.
> >
> > So far, when I've done this myself (including when using the
> > output from R to give the points being joined), I've done the
> > computation of the "intermediate" points "by hand". This
> > basically involves deciding, at each of the points being
> > joined, what the tangent to the smooth curve shouold be.
> >
> > Of course, there is an element of arbitrariness in this,
> > unless there is an analytic representation of the curve on
> > which the points lie (e.g. you're plotting sin(x)/x every
> > pi/8, and want to join them smoothly), when all you need is
> > the derivatives at the points.
> >
> > Crudely, you might evaluate the direction at a point in terms
> > os a weighted average of the directions to its two immediate
> > neighbours (the nearer meghbour ges the greater weight); less
> > crudely, you might fit a quadratic through the point and its
> > 2 neighbours and use the gradient at the middle point; and so on.
> >
> > Once you've decided on the tangent at each point, it's then
> > straightforward to compute suitable "intermediate points"
> > to serve as (x1,y2) and (x2,y2).
> >
> > (One application where this sort of approach is needed is in
> > joining computed points on iso-contours, where the individual
> > points have been determined by interpolation of
> > spot-measurements at nearby measuring stations).
> >
> > Anyway. The Question: is there a general function for the
> > above kind of smooth curve-drawing?
> >
> > With thanks,
> > Ted.
> >
> > --------------------------------------------------------------------
> > E-Mail: (Ted Harding) <ted.harding_at_nessie.mcc.ac.uk>
> > Fax-to-email: +44 (0)870 094 0861
> > Date: 01-May-07 Time: 14:50:38
> > ------------------------------ XFMail ------------------------------
> >
> > ______________________________________________
> > R-help_at_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/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> ------------------------------
>
> Message: 17
> Date: Tue, 1 May 2007 10:02:38 -0500
> From: "Earl F. Glynn" <efg_at_stowers-institute.org>
> Subject: Re: [R] Polar graph of time and tide
> To: r-help_at_stat.math.ethz.ch
> Message-ID: <f17kqh$j90$1@sea.gmane.org>
>
> "Alan E. Davis" <lngndvs_at_gmail.com> wrote in message
> news:7bef1f890705010704n491a34c6w91bd31ebe26bbdff_at_mail.gmail.com...
> >I have been trying to visualize times of lowest tides, month by month.
> > I have tide predictions with times either in unix time or a text
> > format, and heights in feet or meters. I had been able to derive the
> > clock times of each prediction. I would now like to graph this data
> > with points showing heights as "r" and times as "theta", from 0000 to
> > 2355. There is a seasonal component: I am interested in displaying
> > times of lowest tides in particular.
>
> Does this get you started?
>
>
> library(plotrix)
>
> theta <- seq(0, 23.5, by=0.5)
> r <- runif(length(theta), 5, 10)
>
> clock24.plot(r, theta, main="Polar Plot")
>
> or
>
> clock24.plot(r, theta, main="Polar Plot", rp.type="p")
>
>
> efg
> Stowers Institute for Medical Research
>
>
>
> ------------------------------
>
> Message: 18
> Date: Tue, 1 May 2007 16:06:01 +0100
> From: Tak Wing Chan <tw.chan_at_sociology.ox.ac.uk>
> Subject: [R] creating eps files
> To: r-help_at_stat.math.ethz.ch
> Message-ID: <6945da33a4ea4243a1dbe43085b75ac9@sociology.ox.ac.uk>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> Hello,
>
> For a long time, I have been creating eps files from R using the
> following command:
>
> dev.copy2eps(file="my.eps")
>
> This has worked very well. But recently, the compositor of a journal is
> complaining that
>
> "The eps files would be useable except that they have not converted the
> type to outlines"
>
> Sorry for being vague, but I have no idea what this compositor is
> talking about. Do people have similar experience? And is there an
> option in the dev.copy2eps() that I could use to fix this problem?
>
> Many thanks for any suggestion.
>
> Best, Wing
>
>
>
>
> dept addr: Department of Sociology, University of Oxford, Manor Road,
> Oxford OX1 3UQ, UK
> college addr: New College, Holywell Street, Oxford OX1 3BN, UK
> dept tel: +44 (1865) 286176; college tel: +44 (1865) 279593
> http://users.ox.ac.uk/~sfos0006
>
>
>
> ------------------------------
>
> Message: 19
> Date: Tue, 1 May 2007 09:26:09 -0600
> From: "Greg Snow" <Greg.Snow_at_intermountainmail.org>
> Subject: Re: [R] to draw a smooth arc
> To: pbarata_at_infolink.com.br, r-help_at_stat.math.ethz.ch
> Message-ID:
> <07E228A5BE53C24CAD490193A7381BBB9727C1@LP-EXCHVS07.CO.IHC.COM>
> Content-Type: text/plain; charset=us-ascii
>
> Here is an approach that clips the circle you like from symbols down to
> an arc (this will work as long as the arc is less than half a circle,
> for arcs greater than half a circle, you could draw the whole circle
> then use this to draw an arc of the bacground color over the section you
> don't want):
>
> library(TeachingDemos)
> plot(-5:5, -5:5, type='n')
> clipplot( symbols(0,0,circles=2, add=TRUE), c(0,5), c(0,5) )
>
> Hope this helps,
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.snow_at_intermountainmail.org
> (801) 408-8111
>
>
>
> > -----Original Message-----
> > From: r-help-bounces_at_stat.math.ethz.ch
> > [mailto:r-help-bounces_at_stat.math.ethz.ch] On Behalf Of Paulo Barata
> > Sent: Monday, April 30, 2007 8:17 PM
> > To: r-help_at_stat.math.ethz.ch
> > Subject: [R] to draw a smooth arc
> >
> >
> > Dear R-list members,
> >
> > I would like to draw a smooth arc. I can draw an arc
> > parametrically, but this produces an arc too coarse, even
> > allowing for different increments in sequence t in the
> > example below. Function "symbols" (graphics) does produce a
> > smooth circle, but it cannot produce an arc.
> >
> > Please see the following example, drawing complete circles:
> >
> > plot(-5:5,-5:5,type='n')
> > ## draws circle with function symbols (package graphics) ## -
> > inner circle is very smooth:
> > symbols(0,0,circles=2,add=TRUE)
> > ## draws circle parametrically - outer circle is too coarse:
> > pi <- 4*atan(1)
> > t <- seq(0,2*pi,0.02)
> > lines(4*cos(t),4*sin(t))
> >
> > Package "plotrix" has a function "draw.arc", but arcs
> > produced with this function are also either too coarse or too
> > polygonal, depending on the number of polygons used to
> > approximate the arc.
> >
> > Is there a way to harness the characteristics of function
> > "symbols" (graphics) to draw a smooth arc, not just a complete circle?
> >
> > I am using R 2.5.0, running under Windows XP.
> >
> > Thank you very much.
> >
> > Paulo Barata
> >
> > -----------------------------------------------------------------
> > Paulo Barata
> > Fundacao Oswaldo Cruz (Oswaldo Cruz Foundation) Rua Leopoldo
> > Bulhoes 1480 - 8A 21041-210 Rio de Janeiro - RJ Brazil
> > E-mail: pbarata_at_infolink.com.br
> >
> > ______________________________________________
> > R-help_at_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/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> ------------------------------
>
> Message: 20
> Date: Tue, 1 May 2007 16:27:32 +0100 (BST)
> From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
> Subject: Re: [R] creating eps files
> To: Tak Wing Chan <tw.chan_at_sociology.ox.ac.uk>
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <Pine.LNX.4.64.0705011621480.27865@gannet.stats.ox.ac.uk>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Tue, 1 May 2007, Tak Wing Chan wrote:
>
> > Hello,
> >
> > For a long time, I have been creating eps files from R using the
> > following command:
> >
> > dev.copy2eps(file="my.eps")
> >
> > This has worked very well. But recently, the compositor of a journal is
> > complaining that
> >
> > "The eps files would be useable except that they have not converted the
> > type to outlines"
> >
> > Sorry for being vague, but I have no idea what this compositor is
> > talking about. Do people have similar experience? And is there an
> > option in the dev.copy2eps() that I could use to fix this problem?
>
> I suspect he means that he wants the fonts embedded, which is not what eps
> requires. See the article in R-News about doing that:
>
> http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf
>
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> 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, UK Fax: +44 1865 272595
>
>
>
> ------------------------------
>
> Message: 21
> Date: Tue, 1 May 2007 16:34:23 +0100 (BST)
> From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
> Subject: Re: [R] Concepts question: environment, frame, search path
> To: Duncan Murdoch <murdoch_at_stats.uwo.ca>
> Cc: r-help_at_stat.math.ethz.ch, Graham Wideman
> <gwlist_at_grahamwideman.com>
> Message-ID: <Pine.LNX.4.64.0705011627590.27865@gannet.stats.ox.ac.uk>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Tue, 1 May 2007, Duncan Murdoch wrote:
>
> > On 01/05/2007 12:29 AM, Graham Wideman wrote:
> >> Folks:
> >>
> >> I'd appreciate if someone could straighten me out on a few concepts
> which
> >> are described a bit ambiguously in the docs.
> >>
> >> 1. data.frame:
> >> ----------------
> >> Refan p84: 'A data frame is a list of variables of the same length with
> >> unique row names, given class "data.frame".'
> >>
> >> I probably don't need to point out how opaque that is!
> >
> > Which manual are you looking at? The "reference index" (refman.pdf)? It
> > doesn't usually include statements like that; they are usually found in
> > the Introduction to R (R-intro.pdf) or the R Language Definition
> > (R-lang.pdf). But since the refman is just a collection of man pages,
> > it might be in there somewhere. And since the manuals do get updated,
> > that statement may not be present in the current release. (I did a
> > quick search of the source, and couldn't spot it, but my search might
> > have failed because of line breaks, strange formatting, or looking in
> > the wrong place.)
> >
> > By the way, it's generally best to cite the section name where you found
> > a quote, because the pagination varies from system to system. Even
> > better would be to give a URL to the online HTML version at
> > http://cran.r-project.org/manuals.html.
> >
> > For future reference, if you are suggesting a change, it's best to cite
> > the line number in the source at
> > https://svn.r-project.org/R/trunk/doc/manual in the *.texi files or
> > https://svn.r-project.org/R/trunk/src/library/*/man/*.Rd for man pages,
> > and send such suggestions to the R-devel list.
> >
> >> Anyhow, key question: Some places in the docs seem pretty firm that a
> >> data.frame is basically a 2-D array with:
> >> a) named rows and
> >> b) columns whose items within a column be of uniform data type.
> >>
> >> Elsewhere, it seems like a data.frame can be a collection of arbitrary
> >> variables.
> >
> > The former interpretation is correct. Since the variables all have the
> > same length, things like df[i, j] make sense: they choose the i'th
> > entry from the j'th variable (according to the "refan" definition), or
> > the i'th row, j'th column (according to the 2-D array interpretation.
> >>
> >> 2. environment
> >> ---------------
> >> Refman p122: "Environments consist of a frame, or collection of named
> >> objects, and a pointer to an enclosing environment."
> >>
> >> Is the "or" here explaining parenthetically that a frame is a
> collection of
> >> named objects, or is separating too alternative structures for an
> >> environment?
> >
> > The former.
> >>
> >> If the former, does this imply that a frame can contain arbitrary
> variables?
> >
> > Yes, but a frame isn't an R object, it's a concept that appears in
> > descriptions, e.g. part of an environment, or the local variables
> > created during function evaluation, etc.
> >>
> >> And "pointer"? Is that a type of thing in R?
> >
> > No, there are no pointers in R. There are a couple of tricks to fake
> > them (e.g. environment objects aren't copied when assigned, you just get
> > a new reference to the same environment; this allows you to construct
> > something like a pointer by wrapping an object in an environment), but I
> > don't recommend using these routinely.
>
> Nevertheless, the statement is true. R is implemented using pointers.
>
>
> >> 3. R search path; attach()
> >> ----------------------------
> >> The R search path appears to hold the list of "collections of data" (my
> >> term) that can be accessed by a users' commands. Refman p27 tells that
> >> search path can hold items that are data.frame, list, environment or R
> data
> >> file (on disk). Yet R-intro p28 describes attach() as taking a
> "directory
> >> name" argument. What is the concept "directory" in this context?
> >
> > I haven't read the preceding pages carefully, but that looks like an
> > error. The usual argument to attach is a package name, and what gets
> > attached is an environment holding the exports from the package.
> > Packages are stored in directories in the file system, so maybe that's
> > what the author of that line had in mind.
>
> For the record, it is old S terminology: that document was converted from
> notes for S. What S(-PLUS) now calls 'chapters' it used to call
> directories.
>
> Also for the record, these documents do not have page numbers: their
> layout depends on the version of R, paper size and the tools used to
> prepare them.
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> 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, UK Fax: +44 1865 272595
>
>
>
> ------------------------------
>
> Message: 22
> Date: Tue, 1 May 2007 08:34:57 -0700 (PDT)
> From: raymond chiruka <rtchiruka_at_yahoo.com>
> Subject: [R] logrank test
> To: r <r-help_at_stat.math.ethz.ch>
> Message-ID: <94689.23988.qm@web33006.mail.mud.yahoo.com>
> Content-Type: text/plain
>
> how do l programme the logrank test. l am trying to compare 2 survival
> curves
>
>
>
> ---------------------------------
>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 23
> Date: Tue, 01 May 2007 18:01:38 +0200
> From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
> Subject: Re: [R] logrank test
> To: raymond chiruka <rtchiruka_at_yahoo.com>
> Cc: r <r-help_at_stat.math.ethz.ch>
> Message-ID: <46376462.70607@biostat.ku.dk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> raymond chiruka wrote:
> > how do l programme the logrank test. l am trying to compare 2 survival
> curves
> >
> >
> >
> library(survival)
> ?survdiff
>
>
>
> ------------------------------
>
> Message: 24
> Date: Tue, 01 May 2007 11:01:47 -0500
> From: Marc Schwartz <marc_schwartz_at_comcast.net>
> Subject: Re: [R] logrank test
> To: raymond chiruka <rtchiruka_at_yahoo.com>
> Cc: r <r-help_at_stat.math.ethz.ch>
> Message-ID: <1178035307.5009.1.camel@localhost.localdomain>
> Content-Type: text/plain
>
> On Tue, 2007-05-01 at 08:34 -0700, raymond chiruka wrote:
> > how do l programme the logrank test. l am trying to compare 2 survival
> curves
>
>
> See:
>
> library(survival)
> ?survdiff
>
> and take note of the 'rho' argument, which when set to 0 is the logrank
> test.
>
> HTH,
>
> Marc Schwartz
>
>
>
> ------------------------------
>
> Message: 25
> Date: Tue, 1 May 2007 12:03:27 -0400
> From: "Roland Rau" <roland.rproject_at_gmail.com>
> Subject: Re: [R] logrank test
> To: "raymond chiruka" <rtchiruka_at_yahoo.com>
> Cc: r <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <47c7c59e0705010903t72c2bb35oee6971bb1f08d0a9@mail.gmail.com>
> Content-Type: text/plain
>
> Hi,
>
> On 5/1/07, raymond chiruka <rtchiruka_at_yahoo.com> wrote:
> >
> > how do l programme the logrank test. l am trying to compare 2 survival
> > curves
>
>
> if you simply want to use the logrank test, have a look at the first
> example
> of the function survdiff in the survival package. If you read the help
> page
> there, it says that the default setting of rho=0 is the log rank test.
> library(survival)
> survdiff(Surv(futime, fustat) ~ rx,data=ovarian)
> survdiff(Surv(futime, fustat) ~ rx,data=ovarian, rho=0)
>
> I hope this helps?
>
> Best,
> Roland
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 26
> Date: Tue, 1 May 2007 17:04:50 +0100 (BST)
> From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
> Subject: Re: [R] to draw a smooth arc
> To: Greg Snow <Greg.Snow_at_intermountainmail.org>
> Cc: r-help_at_stat.math.ethz.ch, pbarata_at_infolink.com.br
> Message-ID: <Pine.LNX.4.64.0705011656260.28173@gannet.stats.ox.ac.uk>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Tue, 1 May 2007, Greg Snow wrote:
>
> > Here is an approach that clips the circle you like from symbols down to
> > an arc (this will work as long as the arc is less than half a circle,
> > for arcs greater than half a circle, you could draw the whole circle
> > then use this to draw an arc of the bacground color over the section you
> > don't want):
> >
> > library(TeachingDemos)
> > plot(-5:5, -5:5, type='n')
> > clipplot( symbols(0,0,circles=2, add=TRUE), c(0,5), c(0,5) )
>
> I had considered this approach: clipping a circle to a rectangle isn't
> strictly an arc, as will be clear if the line width is large.
> Consider
>
> clipplot(symbols(0, 0 ,circles=2, add=TRUE, lwd=5), c(-1,5), c(-1,5))
>
> Note too that what happens with clipping is device-dependent. If R's
> internal clipping is used, the part-circle is converted to a polygon.
>
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> 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, UK Fax: +44 1865 272595
>
>
>
> ------------------------------
>
> Message: 27
> Date: Tue, 1 May 2007 10:07:38 -0600
> From: sj <ssj1364_at_gmail.com>
> Subject: [R] linout=TRUE in nnet package ?
> To: r-help <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <1c6126db0705010907rfba9d00n22ac108e0c697917@mail.gmail.com>
> Content-Type: text/plain
>
> Hello,
>
> I am trying to figure out what nnet does when you select nnet =TRUE, I
> understand that it provides you with linear outputs, but I don't
> understand
> how it arrives at those linear outputs. I assume that nnet still applies
> the
> logistic function as the activation function for the nodes in the hidden
> layer, but I also assume another activation function must be applied at
> the
> output layer in order to return the predictions to the linear scale. I am
> not able to figure out what is happening from the documentation, could
> anyone provide more details about what nnet does at the output layer?
>
> best,
>
> Spencer
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 28
> Date: Tue, 1 May 2007 12:09:12 -0400
> From: "Roland Rau" <roland.rproject_at_gmail.com>
> Subject: Re: [R] logrank test
> To: "raymond chiruka" <rtchiruka_at_yahoo.com>
> Cc: r <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <47c7c59e0705010909p1174447bn65504bb98182d083@mail.gmail.com>
> Content-Type: text/plain
>
> And since Peter Dalgaard also just answered (without advertising his
> book):
> if you (or your library) happen to have 'Introductory Statistics with R'
> by
> Peter Dalgaard, have a look at section 12.4.
>
> Best,
> Roland
>
> On 5/1/07, raymond chiruka <rtchiruka_at_yahoo.com> wrote:
> >
> > how do l programme the logrank test. l am trying to compare 2 survival
> > curves
> >
> >
> >
> > ---------------------------------
> >
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help_at_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/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 29
> Date: Tue, 1 May 2007 18:03:04 +0100
> From: "alex lam \(RI\)" <alex.lam_at_bbsrc.ac.uk>
> Subject: [R] Matrix column name
> To: <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <84DA9D8AC9B05F4B889E7C70238CB45105C8FCD6@rie2ksrv1.ri.bbsrc.ac.uk>
> Content-Type: text/plain; charset="us-ascii"
>
> Dear R users,
>
> Having searched the mail archive I think the conclusion was that it is
> not possible to have a column name when there is only one column in the
> matrix. But I thought I'd check with the more experienced users.
>
> What I tried to do was: in a loop I pick a column, record the column
> name and remove the column from the matrix. But when there were 2
> columns left, after one column was removed, the last column name
> disappeared by default. It means that I always miss out the last column.
>
> I tried this by hand:
>
> > matrix.a
> 801 802 803
> [1,] -0.0906346 0.0906346 0.0906346
> [2,] -0.0804911 0.0804911 0.0804911
> [3,] -0.0703796 0.0703796 0.0703796
> > matrix.a<-as.matrix(matrix.a[,-1])
> > matrix.a
> 802 803
> [1,] 0.0906346 0.0906346
> [2,] 0.0804911 0.0804911
> [3,] 0.0703796 0.0703796
> > matrix.a<-as.matrix(matrix.a[,-1])
> > matrix.a
> [,1]
> [1,] 0.0906346
> [2,] 0.0804911
> [3,] 0.0703796
>
> Is there a way to force the column name to remain in such a case?
>
> Thanks,
> Alex
>
> > sessionInfo()
> R version 2.4.1 (2006-12-18)
> i386-pc-mingw32
>
> locale:
> LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United
> Kingdom.1252;LC_MONETARY=English_United
> Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252
>
> attached base packages:
> [1] "stats" "graphics" "grDevices" "utils" "datasets"
> "methods"
> [7] "base"
> >
>
> ------------------------------------
> Alex Lam
> PhD student
> Department of Genetics and Genomics
> Roslin Institute (Edinburgh)
> Roslin
> Midlothian EH25 9PS
> Great Britain
>
> Phone +44 131 5274471
> Web http://www.roslin.ac.uk
>
> Roslin Institute is a company limited by guarantee, registered in
> Scotland (registered number SC157100) and a Scottish Charity (registered
> number SC023592). Our registered office is at Roslin, Midlothian, EH25
> 9PS. VAT registration number 847380013.
>
> The information contained in this e-mail (including any attachments) is
> confidential and is intended for the use of the addressee only. The
> opinions expressed within this e-mail (including any attachments) are
> the opinions of the sender and do not necessarily constitute those of
> Roslin Institute (Edinburgh) ("the Institute") unless specifically
> stated by a sender who is duly authorised to do so on behalf of the
> Institute
>
>
>
> ------------------------------
>
> Message: 30
> Date: Tue, 1 May 2007 19:03:46 +0200
> From: Th?r Brigitte <Brigitte.Thuer_at_swica.ch>
> Subject: [R] Simulation using parts of density function
> To: <r-help_at_stat.math.ethz.ch>
> Cc: <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <486F261AFF288E498FD724CD4A289DD8AFE49B@msxwtgd02.internal.loc>
> Content-Type: text/plain
>
>
> Hi
>
> My simulation with the followin R code works perfectly:
> sim <- replicate(999, sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape =
> 12))))
>
> But now I do not want to have values in object "sim" exceeding 5'000'000,
> that means that I am just using the beginning of densitiy function gamma x <
> 15.4. Is there a possibility to modify my code in an easy way?
>
> Thanks for any help!
>
> Regards, Brigitte
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 31
> Date: Tue, 1 May 2007 19:03:46 +0200
> From: Th?r Brigitte <Brigitte.Thuer_at_swica.ch>
> Subject: [R] Simulation using parts of density function
> To: <r-help_at_stat.math.ethz.ch>
> Cc: <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <486F261AFF288E498FD724CD4A289DD8AFE49B@msxwtgd02.internal.loc>
> Content-Type: text/plain
>
>
> Hi
>
> My simulation with the followin R code works perfectly:
> sim <- replicate(999, sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape =
> 12))))
>
> But now I do not want to have values in object "sim" exceeding 5'000'000,
> that means that I am just using the beginning of densitiy function gamma x <
> 15.4. Is there a possibility to modify my code in an easy way?
>
> Thanks for any help!
>
> Regards, Brigitte
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 32
> Date: Tue, 01 May 2007 12:14:07 -0500
> From: Marc Schwartz <marc_schwartz_at_comcast.net>
> Subject: Re: [R] Matrix column name
> To: "alex lam (RI)" <alex.lam_at_bbsrc.ac.uk>
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <1178039647.5009.14.camel@localhost.localdomain>
> Content-Type: text/plain
>
> On Tue, 2007-05-01 at 18:03 +0100, alex lam (RI) wrote:
> > Dear R users,
> >
> > Having searched the mail archive I think the conclusion was that it is
> > not possible to have a column name when there is only one column in the
> > matrix. But I thought I'd check with the more experienced users.
> >
> > What I tried to do was: in a loop I pick a column, record the column
> > name and remove the column from the matrix. But when there were 2
> > columns left, after one column was removed, the last column name
> > disappeared by default. It means that I always miss out the last column.
>
> See R FAQ 7.5 Why do my matrices lose dimensions:
>
>
> http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-my-matrices-lose-dimensions_003f
>
> which has some examples, along with ?Extract
>
> To wit:
>
> MAT <- matrix(1:12, ncol = 3)
>
> colnames(MAT) <- LETTERS[1:3]
>
> > MAT
> A B C
> [1,] 1 5 9
> [2,] 2 6 10
> [3,] 3 7 11
> [4,] 4 8 12
>
>
> > MAT[, 1]
> [1] 1 2 3 4
>
>
> > MAT[, 1, drop = FALSE]
> A
> [1,] 1
> [2,] 2
> [3,] 3
> [4,] 4
>
>
> HTH,
>
> Marc Schwartz
>
>
>
> ------------------------------
>
> Message: 33
> Date: Tue, 1 May 2007 13:18:36 -0400
> From: John Christie <jc_at_or.psychology.dal.ca>
> Subject: [R] calculating area under the ROC curve
> To: R-help_at_stat.math.ethz.ch
> Message-ID:
> <2CEA8F03-C473-43A3-BD60-89187821290B@or.psychology.dal.ca>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> Hi,
> I recently did a study where we gathered decisions and confidence
> ratings. My understanding is that I can convert this to a ROC curve
> by getting hits and false alarms at the various confidence ratings.
> I figured out that part of the problem. I noticed a few functions
> for calculating AUC. Are there any preferred ones for this
> particular kind of design?
>
>
>
> ------------------------------
>
> Message: 34
> Date: Tue, 01 May 2007 14:29:53 -0300
> From: Paulo Barata <pbarata_at_infolink.com.br>
> Subject: Re: [R] to draw a smooth arc
> To: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
> Cc: r-help_at_stat.math.ethz.ch, Greg Snow
> <Greg.Snow_at_intermountainmail.org>
> Message-ID: <46377911.9000404@infolink.com.br>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> Dr. Snow and Prof. Ripley,
>
> Dr. Snow's suggestion, using clipplot (package TeachingDemos),
> is maybe a partial solution to the problem of drawing an arc of
> a circle (as long as the line width of the arc is not that large,
> as pointed out by Prof. Ripley). If the arc is symmetrical around
> a vertical line, then it is not so difficult to draw it that way.
> But an arc that does not have this kind of symmetry would possibly
> require some geometrical computations to find the proper rectangle
> to be used for clipping.
>
> I would like to suggest that in a future version of R some function
> be included in the graphics package to draw smooth arcs with
> given center, radius, initial and final angles. I suppose
> that the basic ingredients are available in function "symbols"
> (graphics).
>
> Thank you very much.
>
> Paulo Barata
> (Rio de Janeiro - Brazil)
>
> -----------------------------------------------------------------------
> Prof Brian Ripley wrote:
> > On Tue, 1 May 2007, Greg Snow wrote:
> >
> >> Here is an approach that clips the circle you like from symbols down to
> >> an arc (this will work as long as the arc is less than half a circle,
> >> for arcs greater than half a circle, you could draw the whole circle
> >> then use this to draw an arc of the bacground color over the section
> you
> >> don't want):
> >>
> >> library(TeachingDemos)
> >> plot(-5:5, -5:5, type='n')
> >> clipplot( symbols(0,0,circles=2, add=TRUE), c(0,5), c(0,5) )
> >
> > I had considered this approach: clipping a circle to a rectangle isn't
> > strictly an arc, as will be clear if the line width is large.
> > Consider
> >
> > clipplot(symbols(0, 0 ,circles=2, add=TRUE, lwd=5), c(-1,5), c(-1,5))
> >
> > Note too that what happens with clipping is device-dependent. If R's
> > internal clipping is used, the part-circle is converted to a polygon.
> >
> >
>
>
>
> ------------------------------
>
> Message: 35
> Date: Tue, 1 May 2007 19:33:58 +0200
> From: Romain.Mayor_at_ville-ge.ch
> Subject: [R] sorting in barplot
> To: r-help_at_stat.math.ethz.ch
> Message-ID:
> <
> OF0EB452E4.9B269070-ONC12572CE.005FE2DA-C12572CE.00607EC2_at_ville-ge.ch>
>
> Content-Type: text/plain; charset=US-ASCII
>
>
> Hello,
>
> I'm trying to sort my bargraph.CI plot (function like barplot in the
> SCIPLOT package) by the mean of the response variable.
>
> Does somebody have a trick for it.
>
> Thank you.
>
> Romain Mayor, PHD student.
>
>
>
> ------------------------------
>
> Message: 36
> Date: Tue, 01 May 2007 12:49:17 -0500
> From: Marc Schwartz <marc_schwartz_at_comcast.net>
> Subject: Re: [R] sorting in barplot
> To: Romain.Mayor_at_ville-ge.ch
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <1178041757.5009.19.camel@localhost.localdomain>
> Content-Type: text/plain
>
> On Tue, 2007-05-01 at 19:33 +0200, Romain.Mayor_at_ville-ge.ch wrote:
> > Hello,
> >
> > I'm trying to sort my bargraph.CI plot (function like barplot in the
> > SCIPLOT package) by the mean of the response variable.
> >
> > Does somebody have a trick for it.
> >
> > Thank you.
> >
> > Romain Mayor, PHD student.
>
> If it is built on top of barplot(), then by default, the factor levels
> of your response variable will determine the order of the bars in the
> plot.
>
> See ?reorder.factor for more details relative to defining the order
> based upon the mean of the variable. There is an example there of using
> the median.
>
> HTH,
>
> Marc Schwartz
>
>
>
> ------------------------------
>
> Message: 37
> Date: Tue, 01 May 2007 19:18:07 +0100 (BST)
> From: (Ted Harding) <ted.harding_at_nessie.mcc.ac.uk>
> Subject: Re: [R] Simulation using parts of density function
> To: Th?r Brigitte <Brigitte.Thuer_at_swica.ch>
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <XFMail.070501191807.ted.harding@nessie.mcc.ac.uk>
> Content-Type: text/plain; charset=iso-8859-1
>
> On 01-May-07 17:03:46, Th?r Brigitte wrote:
> >
> > Hi
> >
> > My simulation with the followin R code works perfectly:
> > sim <- replicate(999, sum(exp(rgamma(rpois(1,2000),
> > scale = 0.5, shape = 12))))
> >
> > But now I do not want to have values in object "sim" exceeding
> > 5'000'000, that means that I am just using the beginning of
> > densitiy function gamma x < 15.4. Is there a possibility to
> > modify my code in an easy way?
> >
> > Thanks for any help!
> >
> > Regards, Brigitte
>
> A somewhat extreme problem!
>
> The easiest way to modify the code is as below -- certiainly easier
> than writing a special function to draw random samples from the
> truncated gamma distribution.
>
> A bit of experimentation shows that, from your code above, about
> 10% of the results are <= 5000000. So:
>
> sim<-NULL
> remain <- 999
> while(remain>0){
> sim0<-replicate(10*remain,
> sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape = 12)))
> )
> sim<-c(sim,sim0[sim0<=5000000])
> remain<-(999 - length(sim))
> }
> sim<-sim[1:999]
>
> Results of a run:
>
> sum(sim>5000000)
> [1] 0
>
> max(sim)
> [1] 4999696
>
> length(sim)
> [1] 999
>
> It may be on the slow side (though not hugely -- on a quite slow
> machine the above run was completed in 2min 5sec, while the
> 999-replicate in your original took 15sec. So about 8 times as long.
> Most of this, of course, is taken up with the first round.
>
> Hoping this helps,
> Ted.
>
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <ted.harding_at_nessie.mcc.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 01-May-07 Time: 19:18:01
> ------------------------------ XFMail ------------------------------
>
>
>
> ------------------------------
>
> Message: 38
> Date: Tue, 1 May 2007 11:46:18 -0700
> From: Lisa Solomon <lisas_at_salford-systems.com>
> Subject: [R] Free Webinar: Vendor Neutral Intro to Data Mining for
> Absolute Beginners, May 23, 2007
> To: r-help <r-help_at_stat.math.ethz.ch>
> Message-ID: <Q0s4QVhWUiVaLjJQIC8pODkzNjY5Mzc@sspc-lisa>
> Content-Type: text/plain
>
> ONLINE VENDOR NEUTRAL INTRO TO DATA MINING FOR ABSOLUTE BEGINNERS
> (no charge)
>
> A non-technical data mining introduction for absolute beginners
> May 23, 2007, 10AM - 11AM PST
> Future Sessions (June 14, Sept 7)
>
> To register for the webinar
> -------------------------------------------------------
> 1. Go to https://salford.webex.com/salford/onstage/g.php?d=928318845&t=a
> 2. Click "Enroll".
> 3. On the registration form, enter your information and then click
> "Submit".
>
> Once you have registered, you will receive a confirmation email message
> with instructions on how to join the event, as well as audio and system
> requirements. Please read this confirmation email carefully!
>
> This one-hour webinar is a perfect place to start if you are new to data
> mining and have little-to-no background in statistics or machine learning.
>
> In one hour, we will discuss:
>
> **Data basics: what kind of data is required for data mining and
> predictive analytics; In what format must the data be; what steps are
> necessary to prepare data appropriately
>
> **What kinds of questions can we answer with data mining

>
> **How data mining models work: the inputs, the outputs, and the nature of
> the predictive mechanism
>
> **Evaluation criteria: how predictive models can be assessed and their
> value measured
>
> **Specific background knowledge to prepare you to begin a data mining
> project.
>
> Please do not hesitate to contact me if you have any questions.
>
> Sincerely,
> Lisa Solomon
> lisas_at_salford-systems.com
>
>
>
> ------------------------------
>
> Message: 39
> Date: Wed, 02 May 2007 08:44:07 +1200
> From: Paul Murrell <p.murrell_at_auckland.ac.nz>
> Subject: Re: [R] to draw a smooth arc
> To: pbarata_at_infolink.com.br
> Cc: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>, Greg Snow
> <Greg.Snow_at_intermountainmail.org>, r-help_at_stat.math.ethz.ch
> Message-ID: <4637A697.8090400@stat.auckland.ac.nz>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi
>
>
> Paulo Barata wrote:
> > Dr. Snow and Prof. Ripley,
> >
> > Dr. Snow's suggestion, using clipplot (package TeachingDemos),
> > is maybe a partial solution to the problem of drawing an arc of
> > a circle (as long as the line width of the arc is not that large,
> > as pointed out by Prof. Ripley). If the arc is symmetrical around
> > a vertical line, then it is not so difficult to draw it that way.
> > But an arc that does not have this kind of symmetry would possibly
> > require some geometrical computations to find the proper rectangle
> > to be used for clipping.
> >
> > I would like to suggest that in a future version of R some function
> > be included in the graphics package to draw smooth arcs with
> > given center, radius, initial and final angles. I suppose
> > that the basic ingredients are available in function "symbols"
> > (graphics).
>
>
> Just to back up a few previous posts ...
>
> There is something like this facility already available via the
> grid.xspline() function in the grid package. This provides very
> flexible curve drawing (including curves very close to Bezier curves)
> based on the X-Splines implemented in xfig. The grid.curve() function
> provides a convenience layer that allows for at least certain
> parameterisations of arcs (you specify the arc end points and the angle).
>
> These functions are built on functionality within the core graphics
> engine, so exposing a similar interface (e.g., an xspline() function)
> within "traditional" graphics would be relatively straightforward.
>
> The core functionality draws the curves as line segments (but
> automatically figures out how many segments to use so that the curve
> looks smooth); it does NOT call curve-drawing primitives in the
> graphics device (like PostScript's curveto).
>
> In summary: there is some support for smooth curves, but we could still
> benefit from a specific arc() function with the standard
> centre-radius-angle parameterisation and we could also benefit from
> exposing the native strengths of different graphics devices (rather than
> the current lowest-common-denominator approach).
>
> Paul
>
>
> > Thank you very much.
> >
> > Paulo Barata
> > (Rio de Janeiro - Brazil)
> >
> > -----------------------------------------------------------------------
> > Prof Brian Ripley wrote:
> >> On Tue, 1 May 2007, Greg Snow wrote:
> >>
> >>> Here is an approach that clips the circle you like from symbols down
> to
> >>> an arc (this will work as long as the arc is less than half a circle,
> >>> for arcs greater than half a circle, you could draw the whole circle
> >>> then use this to draw an arc of the bacground color over the section
> you
> >>> don't want):
> >>>
> >>> library(TeachingDemos)
> >>> plot(-5:5, -5:5, type='n')
> >>> clipplot( symbols(0,0,circles=2, add=TRUE), c(0,5), c(0,5) )
> >> I had considered this approach: clipping a circle to a rectangle isn't
> >> strictly an arc, as will be clear if the line width is large.
> >> Consider
> >>
> >> clipplot(symbols(0, 0 ,circles=2, add=TRUE, lwd=5), c(-1,5), c(-1,5))
> >>
> >> Note too that what happens with clipping is device-dependent. If R's
> >> internal clipping is used, the part-circle is converted to a polygon.
> >>
> >>
> >
> > ______________________________________________
> > R-help_at_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/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> --
> Dr Paul Murrell
> Department of Statistics
> The University of Auckland
> Private Bag 92019
> Auckland
> New Zealand
> 64 9 3737599 x85392
> paul_at_stat.auckland.ac.nz
> http://www.stat.auckland.ac.nz/~paul/
>
>
>
> ------------------------------
>
> Message: 40
> Date: Tue, 1 May 2007 22:14:01 +0100 (BST)
> From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
> Subject: Re: [R] Matrix column name
> To: "alex lam (RI)" <alex.lam_at_bbsrc.ac.uk>
> Cc: r-help_at_stat.math.ethz.ch
> Message-ID: <Pine.LNX.4.64.0705012212390.20822@gannet.stats.ox.ac.uk>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> You seem to be looking for matrix.a[,-1, drop = TRUE]
>
> On Tue, 1 May 2007, alex lam (RI) wrote:
>
> > Dear R users,
> >
> > Having searched the mail archive I think the conclusion was that it is
> > not possible to have a column name when there is only one column in the
> > matrix. But I thought I'd check with the more experienced users.
> >
> > What I tried to do was: in a loop I pick a column, record the column
> > name and remove the column from the matrix. But when there were 2
> > columns left, after one column was removed, the last column name
> > disappeared by default. It means that I always miss out the last column.
>
> And the matrix became a vector.
>
> >
> > I tried this by hand:
> >
> >> matrix.a
> > 801 802 803
> > [1,] -0.0906346 0.0906346 0.0906346
> > [2,] -0.0804911 0.0804911 0.0804911
> > [3,] -0.0703796 0.0703796 0.0703796
> >> matrix.a<-as.matrix(matrix.a[,-1])
> >> matrix.a
> > 802 803
> > [1,] 0.0906346 0.0906346
> > [2,] 0.0804911 0.0804911
> > [3,] 0.0703796 0.0703796
> >> matrix.a<-as.matrix(matrix.a[,-1])
> >> matrix.a
> > [,1]
> > [1,] 0.0906346
> > [2,] 0.0804911
> > [3,] 0.0703796
> >
> > Is there a way to force the column name to remain in such a case?
> >
> > Thanks,
> > Alex
> >
> >> sessionInfo()
> > R version 2.4.1 (2006-12-18)
> > i386-pc-mingw32
> >
> > locale:
> > LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United
> > Kingdom.1252;LC_MONETARY=English_United
> > Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252
> >
> > attached base packages:
> > [1] "stats" "graphics" "grDevices" "utils" "datasets"
> > "methods"
> > [7] "base"
> >>
> >
> > ------------------------------------
> > Alex Lam
> > PhD student
> > Department of Genetics and Genomics
> > Roslin Institute (Edinburgh)
> > Roslin
> > Midlothian EH25 9PS
> > Great Britain
> >
> > Phone +44 131 5274471
> > Web http://www.roslin.ac.uk
>
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> 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, UK Fax: +44 1865 272595
>
>
>
> ------------------------------
>
> Message: 41
> Date: Tue, 1 May 2007 22:37:29 +0100
> From: "Pedro Sobral" <sobralix_at_gmail.com>
> Subject: [R] to calculate sums
> To: r-help_at_stat.math.ethz.ch
> Message-ID:
> <855386b70705011437j63d5260bnb811d014bea44259@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear R-users,
>
> I am trying to use R to calculate sums like the ones in the file attached.
> Would you please provide some help? At the moment I have no clue about how
> to due...
>
> Thank you in advance,
>
> Kind regards,
> Pedro
>
> ------------------------------
>
> Message: 42
> Date: Tue, 1 May 2007 17:50:01 -0400
> From: "Weiwei Shi" <helprhelp_at_gmail.com>
> Subject: [R] dlda{supclust} 's output
> To: "R Help" <R-help_at_stat.math.ethz.ch>
> Cc: dettling_at_stat.math.ethz.ch
> Message-ID:
> <cdf817830705011450m51381074s82e3d5d4f42c1c61@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi,
>
> I am using dlda algorithm from supclust package and I am wondering if
> the output can be a continuous probability instead of discrete class
> label (zero or one) since it puts some restriction on convariance
> matrix, compared with lda, while the latter can.
>
> thanks,
>
> --
> Weiwei Shi, Ph.D
> Research Scientist
> GeneGO, Inc.
>
> "Did you always know?"
> "No, I did not. But I believed..."
> ---Matrix III
>
>
>
> ------------------------------
>
> Message: 43
> Date: Tue, 01 May 2007 18:57:10 -0300
> From: Paulo Barata <pbarata_at_infolink.com.br>
> Subject: Re: [R] to draw a smooth arc
> To: Paul Murrell <p.murrell_at_auckland.ac.nz>
> Cc: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>, Greg Snow
> <Greg.Snow_at_intermountainmail.org>, r-help_at_stat.math.ethz.ch
> Message-ID: <4637B7B6.7000303@infolink.com.br>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> Dr. Murrell and all,
>
> One final suggestion: a future function arc() in package graphics,
> with centre-radius-angle parameterisation, could also include an
> option to draw arrows at either end of the arc, as one can find
> in function arrows().
>
> Thank you.
>
> Paulo Barata
>
> -----------------------------------------------------------------------
> Paul Murrell wrote:
> > Hi
> >
> >
> > Paulo Barata wrote:
> >> Dr. Snow and Prof. Ripley,
> >>
> >> Dr. Snow's suggestion, using clipplot (package TeachingDemos),
> >> is maybe a partial solution to the problem of drawing an arc of
> >> a circle (as long as the line width of the arc is not that large,
> >> as pointed out by Prof. Ripley). If the arc is symmetrical around
> >> a vertical line, then it is not so difficult to draw it that way.
> >> But an arc that does not have this kind of symmetry would possibly
> >> require some geometrical computations to find the proper rectangle
> >> to be used for clipping.
> >>
> >> I would like to suggest that in a future version of R some function
> >> be included in the graphics package to draw smooth arcs with
> >> given center, radius, initial and final angles. I suppose
> >> that the basic ingredients are available in function "symbols"
> >> (graphics).
> >
> >
> > Just to back up a few previous posts ...
> >
> > There is something like this facility already available via the
> > grid.xspline() function in the grid package. This provides very
> > flexible curve drawing (including curves very close to Bezier curves)
> > based on the X-Splines implemented in xfig. The grid.curve() function
> > provides a convenience layer that allows for at least certain
> > parameterisations of arcs (you specify the arc end points and the
> angle).
> >
> > These functions are built on functionality within the core graphics
> > engine, so exposing a similar interface (e.g., an xspline() function)
> > within "traditional" graphics would be relatively straightforward.
> >
> > The core functionality draws the curves as line segments (but
> > automatically figures out how many segments to use so that the curve
> > looks smooth); it does NOT call curve-drawing primitives in the
> > graphics device (like PostScript's curveto).
> >
> > In summary: there is some support for smooth curves, but we could still
> > benefit from a specific arc() function with the standard
> > centre-radius-angle parameterisation and we could also benefit from
> > exposing the native strengths of different graphics devices (rather than
> > the current lowest-common-denominator approach).
> >
> > Paul
> >
> >
> >> Thank you very much.
> >>
> >> Paulo Barata
> >> (Rio de Janeiro - Brazil)
> >>
> >> -----------------------------------------------------------------------
> >> Prof Brian Ripley wrote:
> >>> On Tue, 1 May 2007, Greg Snow wrote:
> >>>
> >>>> Here is an approach that clips the circle you like from symbols down
> to
> >>>> an arc (this will work as long as the arc is less than half a circle,
> >>>> for arcs greater than half a circle, you could draw the whole circle
> >>>> then use this to draw an arc of the bacground color over the section
> you
> >>>> don't want):
> >>>>
> >>>> library(TeachingDemos)
> >>>> plot(-5:5, -5:5, type='n')
> >>>> clipplot( symbols(0,0,circles=2, add=TRUE), c(0,5), c(0,5) )
> >>> I had considered this approach: clipping a circle to a rectangle isn't
> >>> strictly an arc, as will be clear if the line width is large.
> >>> Consider
> >>>
> >>> clipplot(symbols(0, 0 ,circles=2, add=TRUE, lwd=5), c(-1,5), c(-1,5))
> >>>
> >>> Note too that what happens with clipping is device-dependent. If R's
> >>> internal clipping is used, the part-circle is converted to a polygon.
> >>>
> >>>
> >> ______________________________________________
> >> R-help_at_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/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> ------------------------------
>
> Message: 44
> Date: Wed, 02 May 2007 11:03:45 +1200
> From: Paul Murrell <p.murrell_at_auckland.ac.nz>
> Subject: Re: [R] to draw a smooth arc
> To: pbarata_at_infolink.com.br
> Cc: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>, Greg Snow
> <Greg.Snow_at_intermountainmail.org>, r-help_at_stat.math.ethz.ch
> Message-ID: <4637C751.4080502@stat.auckland.ac.nz>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi
>
>
> Paulo Barata wrote:
> > Dr. Murrell and all,
> >
> > One final suggestion: a future function arc() in package graphics,
> > with centre-radius-angle parameterisation, could also include an
> > option to draw arrows at either end of the arc, as one can find
> > in function arrows().
>
>
> ... and in grid.xspline() and grid.curve().
>
> Paul
>
>
> > Thank you.
> >
> > Paulo Barata
> >
> > -----------------------------------------------------------------------
> > Paul Murrell wrote:
> >> Hi
> >>
> >>
> >> Paulo Barata wrote:
> >>> Dr. Snow and Prof. Ripley,
> >>>
> >>> Dr. Snow's suggestion, using clipplot (package TeachingDemos),
> >>> is maybe a partial solution to the problem of drawing an arc of
> >>> a circle (as long as the line width of the arc is not that large,
> >>> as pointed out by Prof. Ripley). If the arc is symmetrical around
> >>> a vertical line, then it is not so difficult to draw it that way.
> >>> But an arc that does not have this kind of symmetry would possibly
> >>> require some geometrical computations to find the proper rectangle
> >>> to be used for clipping.
> >>>
> >>> I would like to suggest that in a future version of R some function
> >>> be included in the graphics package to draw smooth arcs with
> >>> given center, radius, initial and final angles. I suppose
> >>> that the basic ingredients are available in function "symbols"
> >>> (graphics).
> >>
> >> Just to back up a few previous posts ...
> >>
> >> There is something like this facility already available via the
> >> grid.xspline() function in the grid package. This provides very
> >> flexible curve drawing (including curves very close to Bezier curves)
> >> based on the X-Splines implemented in xfig. The grid.curve() function
> >> provides a convenience layer that allows for at least certain
> >> parameterisations of arcs (you specify the arc end points and the
> angle).
> >>
> >> These functions are built on functionality within the core graphics
> >> engine, so exposing a similar interface (e.g., an xspline() function)
> >> within "traditional" graphics would be relatively straightforward.
> >>
> >> The core functionality draws the curves as line segments (but
> >> automatically figures out how many segments to use so that the curve
> >> looks smooth); it does NOT call curve-drawing primitives in the
> >> graphics device (like PostScript's curveto).
> >>
> >> In summary: there is some support for smooth curves, but we could
> still
> >> benefit from a specific arc() function with the standard
> >> centre-radius-angle parameterisation and we could also benefit from
> >> exposing the native strengths of different graphics devices (rather
> than
> >> the current lowest-common-denominator approach).
> >>
> >> Paul
> >>
> >>
> >>> Thank you very much.
> >>>
> >>> Paulo Barata
> >>> (Rio de Janeiro - Brazil)
> >>>
> >>>
> -----------------------------------------------------------------------
> >>> Prof Brian Ripley wrote:
> >>>> On Tue, 1 May 2007, Greg Snow wrote:
> >>>>
> >>>>> Here is an approach that clips the circle you like from symbols down
> to
> >>>>> an arc (this will work as long as the arc is less than half a
> circle,
> >>>>> for arcs greater than half a circle, you could draw the whole circle
> >>>>> then use this to draw an arc of the bacground color over the section
> you
> >>>>> don't want):
> >>>>>
> >>>>> library(TeachingDemos)
> >>>>> plot(-5:5, -5:5, type='n')
> >>>>> clipplot( symbols(0,0,circles=2, add=TRUE), c(0,5), c(0,5) )
> >>>> I had considered this approach: clipping a circle to a rectangle
> isn't
> >>>> strictly an arc, as will be clear if the line width is large.
> >>>> Consider
> >>>>
> >>>> clipplot(symbols(0, 0 ,circles=2, add=TRUE, lwd=5), c(-1,5), c(-1,5))
> >>>>
> >>>> Note too that what happens with clipping is device-dependent. If R's
> >>>> internal clipping is used, the part-circle is converted to a polygon.
> >>>>
> >>>>
> >>> ______________________________________________
> >>> R-help_at_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/posting-guide.html
> >>> and provide commented, minimal, self-contained, reproducible code.
>
> --
> Dr Paul Murrell
> Department of Statistics
> The University of Auckland
> Private Bag 92019
> Auckland
> New Zealand
> 64 9 3737599 x85392
> paul_at_stat.auckland.ac.nz
> http://www.stat.auckland.ac.nz/~paul/
>
>
>
> ------------------------------
>
> Message: 45
> Date: Tue, 1 May 2007 17:01:52 -0700
> From: "Alan Gibson" <alan.gibson_at_gmail.com>
> Subject: [R] Percentage area of a distribution
> To: R-help_at_stat.math.ethz.ch
> Message-ID:
> <a2f3b2d90705011701x34810e88wd03c3a9d597f1f7a@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> It seems like this should be pretty straight forward, but for some
> reason the answer escapes me.
>
> I have a normal distribution S made up of two normal distributions C
> and C-bar. I need to find the percentage of the area of S that both C
> and C-bar occupy.
>
> Any suggestions?
>
> Thanks in advance,
> Alan Gibson
>
>
>
> ------------------------------
>
> Message: 46
> Date: Tue, 1 May 2007 17:38:44 -0700
> From: "Alan Gibson" <alan.gibson_at_gmail.com>
> Subject: Re: [R] Percentage area of a distribution
> To: R-help_at_stat.math.ethz.ch
> Cc: "Leeds, Mark \(IED\)" <Mark.Leeds_at_morganstanley.com>
> Message-ID:
> <a2f3b2d90705011738p4c4650cfh1414b6cd297f45ef@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> let me amend my previous message to remove a silly mistake:
>
> I have a (non-normal) distribution S that is a mixture of two normal
> distributions C and C-bar. I need to find the percentage of the area
> of S that both C and C-bar occupy.
>
> Thanks again,
> Alan Gibson
>
> On 5/1/07, Leeds, Mark (IED) <Mark.Leeds_at_morganstanley.com> wrote:
> > What do you mean by a normal distribution made up of to normal
> > distributions ? A mixture of two
> > Normals with different variances doesn't result in a normal distribution
> > so I'm not sure what you
> > Nean but maybe someone else does. No offense intended but, if noone
> > replies,
> > That means that noone else understood either.
> >
> >
> > -----Original Message-----
> > From: r-help-bounces_at_stat.math.ethz.ch
> > [mailto:r-help-bounces_at_stat.math.ethz.ch] On Behalf Of Alan Gibson
> > Sent: Tuesday, May 01, 2007 8:02 PM
> > To: R-help_at_stat.math.ethz.ch
> > Subject: [R] Percentage area of a distribution
> >
> > It seems like this should be pretty straight forward, but for some
> > reason the answer escapes me.
> >
> > I have a normal distribution S made up of two normal distributions C and
> > C-bar. I need to find the percentage of the area of S that both C and
> > C-bar occupy.
> >
> > Any suggestions?
> >
> > Thanks in advance,
> > Alan Gibson
> >
> > ______________________________________________
> > R-help_at_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/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> > --------------------------------------------------------
> >
> > This is not an offer (or solicitation of an offer) to buy/sell the
> securities/instruments mentioned or an official confirmation. Morgan
> Stanley may deal as principal in or own or act as market maker for
> securities/instruments mentioned or may advise the issuers. This is not
> research and is not from MS Research but it may refer to a research
> analyst/research report. Unless indicated, these views are the author's and
> may differ from those of Morgan Stanley research or others in the Firm. We
> do not represent this is accurate or complete and we may not update
> this. Past performance is not indicative of future returns. For additional
> information, research reports and important disclosures, contact me or see
> https://secure.ms.com/servlet/cls. You should not use e-mail to request,
> authorize or effect the purchase or sale of any security or instrument, to
> send transfer instructions, or to effect any other transactions. We cannot
> guarantee that any such requests received vi!
> a e-mail will be processed in a timely manner. This communication is
> solely for the addressee(s) and may contain confidential information. We do
> not waive confidentiality by mistransmission. Contact me if you do not wish
> to receive these communications. In the UK, this communication is directed
> in the UK to those persons who are market counterparties or intermediate
> customers (as defined in the UK Financial Services Authority's rules).
> >
>
>
>
> ------------------------------
>
> Message: 47
> Date: Wed, 2 May 2007 10:47:20 +1000
> From: "Floris Van Ogtrop" <f.vanogtrop_at_usyd.edu.au>
> Subject: [R] optimising fitted distributions
> To: <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <3518808712EC8A459CC1FEDAD446449F404432@MAIL1.mcs.usyd.edu.au>
> Content-Type: text/plain
>
> Dear R experts,
>
>
>
> I am relatively new to R and am interested in whether there is a package
> which will fit data with a swag of distributions and determine the
> optimal fit such as stat::fit from technical software solutions?
>
> As is discussed in the following r-help posting goodfit in vcd seems to
> do this for three of the distribution
>
> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/37053.html, have there
> been any further developments for extending this to other distributions?
>
>
>
> Thanks in advanced
>
>
>
> Floris
>
>
>
> Floris van Ogtrop
>
> University of Sydney
>
> Dept. Food Agriculture and Natural Resources
>
> Australia
>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 48
> Date: Wed, 02 May 2007 11:37:22 +1000
> From: Kate Stark <lhodgson_at_postoffice.utas.edu.au>
> Subject: [R] ED50 from logistic model with interactions
> To: r-help_at_stat.math.ethz.ch
> Message-ID: <200705020137.l421bMJX011553@corinna.its.utas.edu.au>
> Content-Type: text/plain
>
>
> Hi,
>
> I was wondering if someone could please help me. I am doing a logistic
> regression to compare size at maturity between 3 seasons. My model is:
>
> fit <- glm(Mature ~ Season * Size - 1, family = binomial, data=dat)
>
> where Mature is a binary response, 0 for immature, 1 for mature. There
> are 3 Seasons.
>
> The Season * Size interaction is significant. I would like to compare the
> size at 50% maturity between Seasons, which I have calculated as:
>
> Mat50_S1 <- -fit$coef[1]/fit$coef[4]
> Mat50_S2 <- -fit$coef[2]/(fit$coef[4] + fit$coef[5])
> Mat50_S3 <- -fit$coef[3]/(fit$coef[4] + fit$coef[6])
>
> But I am not sure how to calculate the standard error around each of
> these estimates. The p.dose function from the MASS package does this
> automatically, but it doesn�t seem to allow interaction terms.
>
> In Faraway(2006) he has an example using the delta method to calculate
> the StdErr, but again without any interactions. I can apply this for the
> first Season, as there is just one intercept and one slope coefficient,
> but for the other 2 Seasons, the slope is a combination of the Size
> coefficient and the Size*Season coefficient, and I am not sure how to use
> the covariance matrix in the delta calculation.
>
> I could divide the data and do 3 different logistic regressions, one for
> each season, but while the Mat50 (i.e. mean Size at 50% maturity) is the
> same as that calculated by the separate lines regression, Im not sure how
> this may change the StdErr?
>
> Regards,
>
> Kate
>
>
> Kate Stark | PhD Candidate
> Institute of Antarctic & Southern Ocean Studies &
> Tasmanian Aquaculture & Fisheries Institute
> University of Tasmania
> Email: kate.stark at utas.edu.au
>
>
>
> ------------------------------
>
> Message: 49
> Date: Tue, 01 May 2007 19:12:32 -0700
> From: graham wideman <gwa_at_grahamwideman.com>
> Subject: Re: [R] Concepts question: environment, frame, search path
> To: r-help_at_stat.math.ethz.ch
> Message-ID: <4.1.20070501175311.016b3160@grahamwideman.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Duncan:
>
> Thanks for taking a stab at my questions -- in following up I discovered
> the root of my difficulties -- I had not noticed document R-lang.pdf ("R
> Language Definition"). This clarifies a great deal.
>
> FWIW, it seems to me that a number of things I was hung up on (and which
> you discussed) revolved around:
>
> 1. Confusion between "frame" and "data.frame". R-lang.pdf has several
> sections that touch on each of these, from which it's more clear (though not
> explicit) that these are not the same things. (Problematic: frame is
> mentioned first, is a more fundamental concept, yet has no entry in the
> Table of Contents, while data.frame does have an entry). (And the converse
> is true of the index!).
>
> 2. Ambiguity in the docs regarding environment, frame (and also regarding
> closely-related concepts closure and enclosure).
>
> Anyhow, I'm now in a much happier state :-).
>
> Regarding your questions:
>
> >> 1. data.frame:
> >> Ref[m]an p84: 'A data frame is a list of variables of the same length
> with
> >> unique row names, given class "data.frame".'
>
> >Which manual are you looking at? The "reference index" (refman.pdf)?
> >[...] that statement may not be present in the current release
>
> Yes, the doc titled "R: A Language and Environment for Statistical
> Computing Reference Index". This is in section I "The base package",
> subsection "data.frame", which was on page 84 of refman.pdf (which I
> downloaded yesterday, but now don't know where from) or on page 86 of
> fullrefman.pdf (downloaded today -- ie: current release).
>
> (And point understood on the suggestions about reporting doc issues --
> though tracking them down to line numbers in the SVN is a bit optimistic,
> not to mention a moving target :-)
>
> -----------
>
> Anyhow, thanks again for the response.
>
> Graham
>
> ---------------------------------------------------
> Graham Wideman
> Resources for programmable diagramming at:
> http://www.diagramantics.com
>
> Brain-related resources:
> http://wideman-one.com
>
>
>
> ------------------------------
>
> Message: 50
> Date: Tue, 1 May 2007 23:16:18 -0400
> From: "Jennifer Dillon" <jdillon_at_hsph.harvard.edu>
> Subject: [R] the Surv function
> To: r-help_at_stat.math.ethz.ch
> Message-ID:
> <7c0535c00705012016h79203c4byc33d9af211515046@mail.gmail.com>
> Content-Type: text/plain
>
> Hi,
>
> I'm trying to do a simple survival analysis on some data, and I'm having
> the
> following problem (here's my code and the error message):
>
> out <- Surv(fup,event=status)
> Error in Surv(fup, event = status) : argument "time2" is missing, with no
> default

>
> >From reading the documentation, it seems that I should be able to simply
> write: Surv(time1, event) if my data is right-censored, which it is.
> Help!
>
> Thanks a million,
>
> Jen
>
>
>
> --
> Jennifer Dillon
> Doctoral Student
> Harvard Biostatistics
> Room 414B, Building 1
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 51
> Date: Tue, 1 May 2007 23:42:24 -0400
> From: "Christos Hatzis" <christos_at_nuverabio.com>
> Subject: Re: [R] the Surv function
> To: "'Jennifer Dillon'" <jdillon_at_hsph.harvard.edu>,
> <r-help_at_stat.math.ethz.ch>
> Message-ID:
> <002f01c78c6b$e67fe840$0202a8c0@headquarters.silicoinsights>
> Content-Type: text/plain; charset="us-ascii"
>
> Try using the following (without naming the arguments) - it should work.
>
> Surv(fup, status)
>
> I think what is happening is that if you use one or two arguments
> (unnamed),
> Surv assumes that you have right-censored data, with the first argument
> being time and the second being status. By specifying 'event' as you did,
> Surv assumes that you have 3 arguments of "type"=counting and it is
> looking
> for the ending time required by the counting data format and this is why
> you
> got the error.
>
> If you are not afraid of R code, type Surv (without the parentheses) to
> see
> the code behind the function.
>
> -Christos
>
> Christos Hatzis, Ph.D.
> Nuvera Biosciences, Inc.
> 400 West Cummings Park
> Suite 5350
> Woburn, MA 01801
> Tel: 781-938-3830
> www.nuverabio.com
>
>
> > -----Original Message-----
> > From: r-help-bounces_at_stat.math.ethz.ch
> > [mai...
>
> [Message clipped]

        [[alternative HTML version deleted]]



R-help_at_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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 03 May 2007 - 01:58:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 May 2007 - 02:31:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.