groemping | 1 May 10:36 2006
Picon

[Rd] wishlist: summary for regression models to report number of omitted cases because of NAs (PR#8824)

Full_Name: Ulrike Grömping
Version: 2.3.0
OS: Windows
Submission from: (NULL) (84.190.150.205)

Whenever any observations are excluded from a regression analysis (lm, glm, and
other similar procedures) because of missing values, I would find it very useful
if this fact is directly visible from the output. I think that the information
should not only be available (I can e.g. look at length of the na.action element
of the lm object) but that a serious statistical software should draw users'
attention to the fact that observations have been excluded. 
For convenience, it would also be nice in general if the number of observations
used in the analysis is indicated (for lm it is of course possible but a bit
awkward to find this number in case of many parameters). 

I hope that this will be implemented because it is quite easy to do (as far as I
can see). It would make it easier for students and applied researchers to comply
with my preaching to always report on the number of valid observations and the
portion of values excluded for missingness.

With kind regards,
Ulrike Grömping

______________________________________________
R-devel <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Martin Maechler | 1 May 16:07 2006
Picon

Re: [Rd] example(ask = .) - default ?

Diverting to R-devel.

After looking at more use cases, etc, I think I would like to
the change the default of 'ask' 
from	   ask = dev.interactive(orNone = TRUE)   # as of two hours ago 
to	   ask = echo && dev.interactive(orNone = TRUE)

since all the cases I've looked which specify  'echo = FALSE'
would also want 'ask = FALSE'.

Comments?

>>>>> "Martin" == Martin Maechler <maechler <at> stat.math.ethz.ch>
>>>>>     on Mon, 1 May 2006 14:11:59 +0200 writes:

>>>>> "FrPi" == François Pinard <pinard <at> iro.umontreal.ca>
>>>>>     on Thu, 27 Apr 2006 17:15:29 -0400 writes:

    FrPi> [Romain Francois]
    >>> [...] it would be useful to add an option 'ask' in
    >>> 'example', maybe with a default to TRUE in interactive
    >>> mode

    FrPi> Seconded.  `example(...)' would be more friendly for
    FrPi> the average use.

    Martin> I've added it now to R-devel.  The default is 'ask =
    Martin> dev.interactive(orNone = TRUE)' where
    Martin> dev.interactive() has also been extended with the
    Martin> 'orNone' argument.
(Continue reading)

Duncan Murdoch | 1 May 18:23 2006
Picon

[Rd] format.info() versus format.default(): Comments please

The format.info() function currently takes args (x, digits = NULL,
nsmall = 0), while format.default() takes many more:

function (x, trim = FALSE, digits = NULL, nsmall = 0, justify = c("left",
      "right", "centre", "none"), width = NULL, na.encode = TRUE,
      scientific = NA, big.mark = "", big.interval = 3, small.mark = "",
      small.interval = 5, decimal.mark = ".", zero.print = NULL,
      ...)

I think it would make sense for format.info to take at least the width,
scientific, big.*, small.*, and zero.print arguments, as these all
affect the output that format.info is calculating, i.e. the width,
decimal places, and scientific notation digits.  (It would probably be
sensible for it to take all possible format() arguments, but ignore some.)

For example, I was just writing some code to format durations as
HH:MM:SS.SSS (where the number of decimal places on the seconds was
chosen according to the values); here I wanted to tell format not
to use scientific notation, but I needed to use options(scipen=) to do
that because format.info doesn't take the scientific=FALSE argument.

Comments?

Duncan Murdoch

______________________________________________
R-devel <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

(Continue reading)

Prof Brian Ripley | 1 May 18:49 2006
Picon
Picon

Re: [Rd] format.info() versus format.default(): Comments please

format.info() is used in no CRAN package (except in lists of known 
functions) and nowhere in R itself so I think you could do whatever you 
wanted by way of extending it.  However, I don't think it going to be 
easy, as apart from scientific those arguments are handled via 
postprocessing by prettyNum.

I would be tempted to replace format.info by a function that analysed the 
results.  The current description is wrong, of course:

> format.info(123456)
[1] 6 0 0
> format(123456, big.mark=",")
[1] "123,456"

There are also assumptions that digits and the decimal mark are of width 
one, but those are I think benign.

On Mon, 1 May 2006, Duncan Murdoch wrote:

> The format.info() function currently takes args (x, digits = NULL,
> nsmall = 0), while format.default() takes many more:
>
> function (x, trim = FALSE, digits = NULL, nsmall = 0, justify = c("left",
>      "right", "centre", "none"), width = NULL, na.encode = TRUE,
>      scientific = NA, big.mark = "", big.interval = 3, small.mark = "",
>      small.interval = 5, decimal.mark = ".", zero.print = NULL,
>      ...)
>
> I think it would make sense for format.info to take at least the width,
> scientific, big.*, small.*, and zero.print arguments, as these all
(Continue reading)

Seth Falcon | 1 May 19:17 2006

[Rd] row.names != rownames for data.frame?

With a recent R 2.4 I notice the following:

df <- data.frame(x=1:2)
> row.names(df)
[1] "1" "2"
> rownames(df)
[1] 1 2

This seems related to recent changes in the internal storage format of
the row names data for data frames. 

The man page for rownames says:

     For a data frame, 'rownames' and 'colnames' are equivalent to
     'row.names' and 'names' respectively.

A number of Bioconductor packages seem to be relying on this.

--

+ seth

R.version
               _                                                               
platform       powerpc-apple-darwin8.6.0                                       
arch           powerpc                                                         
os             darwin8.6.0                                                     
system         powerpc, darwin8.6.0                                            
status         Under development (unstable)                                    
major          2                                                               
(Continue reading)

François Pinard | 1 May 23:51 2006
Picon

Re: [Rd] [R] plot cdf

[Martin Maechler]

>The default is  'ask = dev.interactive(orNone = TRUE)'
>where dev.interactive() has also been extended with the 'orNone'
>argument.

Thanks, Martin! :-)  (As I'm not aware of the meaning of this `orNone' 
argument, I cannot fully appreciate yet the extent of your solution.)

`?dev.interactive' says:

   Test if an interactive graphics device is in use.

I'm not sure what is the meaning of "in use" in that sentence.
An interactive device may be opened, while not being current, so some 
may say that this device is in use, others may say that it is not.  I'm 
not English speaking, but yet, I would dare to suggest either:

    Test if the current graphics device is interactive.

or:

    Test if some opened interactive graphics device is interactive.

rephrased in correct English if needed.

`ask' would ideally be TRUE if the _current_ device is interactive.  If 
there is a used (opened) device which is interactive, but the current 
device is not interactive, it would then be nicer if `ask' was FALSE.

(Continue reading)

Parlamis Franklin | 2 May 04:53 2006
Picon

[Rd] methods for <at> operator

i often find myself having a list of similarly-classed S4 objects and  
needing a list containing a particular extracted slot from those  
objects.  so i did the following:

 > setMethod("slot", signature(object = "list"),
+ 	function(object, name)
+ 		lapply(object, function(i) slot(i, name)))
Creating a new generic function for 'slot' in '.GlobalEnv'
[1] "slot"

which works as expected.

 > setClass("foo", representation(a = "numeric", b = "character"))
[1] "foo"
 > o1 <- new("foo", a = 1:5, b = "one")
 > o2 <- new("foo", a = 6:9, b = "two")
 > slot(list(o1,o2), "a")
[[1]]
[1] 1 2 3 4 5

[[2]]
[1] 6 7 8 9

 > slot(list(o1, list(o1,o2)), "a")
[[1]]
[1] 1 2 3 4 5

[[2]]
[[2]][[1]]
[1] 1 2 3 4 5
(Continue reading)

Parlamis Franklin | 2 May 07:16 2006
Picon

[Rd] expression objects

if 'e' is a vector of mode 'expression', will the following always  
return TRUE:

identical(e, parse(text = as.character(e)))  ?

 > (e <- expression(x, y, z, 200*f%/%d, sin(e)))
expression(x, y, z, 200 * f%/%d, sin(e))
 > identical(e, parse(text = as.character(e)))
[1] TRUE

i have been relying on this fact in some of my code, and would be  
appreciative of any counterexamples.

franklin parlamis

______________________________________________
R-devel <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Gabor Grothendieck | 2 May 08:26 2006
Picon

Re: [Rd] expression objects

Try this:

   e <- as.expression("A")
   identical(parse(text = as.character(e)), e) # FALSE

On 5/2/06, Parlamis Franklin <fparlamis <at> mac.com> wrote:
> if 'e' is a vector of mode 'expression', will the following always
> return TRUE:
>
> identical(e, parse(text = as.character(e)))  ?
>
>  > (e <- expression(x, y, z, 200*f%/%d, sin(e)))
> expression(x, y, z, 200 * f%/%d, sin(e))
>  > identical(e, parse(text = as.character(e)))
> [1] TRUE
>
> i have been relying on this fact in some of my code, and would be
> appreciative of any counterexamples.
>
> franklin parlamis
>
> ______________________________________________
> R-devel <at> r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

______________________________________________
R-devel <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

(Continue reading)

Martin Maechler | 2 May 08:42 2006
Picon

Re: [Rd] [R] plot cdf

>>>>> "FrPi" == François Pinard <pinard <at> iro.umontreal.ca>
>>>>>     on Mon, 1 May 2006 17:51:06 -0400 writes:

    FrPi> [Martin Maechler]
    >> The default is 'ask = dev.interactive(orNone = TRUE)'
    >> where dev.interactive() has also been extended with the
    >> 'orNone' argument.

    FrPi> Thanks, Martin! :-) (As I'm not aware of the meaning
    FrPi> of this `orNone' argument, I cannot fully appreciate
    FrPi> yet the extent of your solution.)

    FrPi> `?dev.interactive' says:

    FrPi>    Test if an interactive graphics device is in use.

    FrPi> I'm not sure what is the meaning of "in use" in that
    FrPi> sentence.  An interactive device may be opened, while
    FrPi> not being current, so some may say that this device is
    FrPi> in use, others may say that it is not.  I'm not
    FrPi> English speaking, but yet, I would dare to suggest
    FrPi> either:

    FrPi>     Test if the current graphics device is interactive.

Thank you, François, for the suggestion.  Yes, it's the above,
and I agree it's clearer than the current text.

The new possibility
    dev.interactive(orNull = TRUE)
(Continue reading)


Gmane