From ripley at stats.ox.ac.uk  Mon Jun 27 10:42:54 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 27 Jun 2005 09:42:54 +0100 (BST)
Subject: [Rd] Unused argument "na.action" to pairs.formula
In-Reply-To: <1D69C8DFA9233040B1E6CB0D3475196239A2B2@exnswn1-syd.nexus.csiro.au>
References: <1D69C8DFA9233040B1E6CB0D3475196239A2B2@exnswn1-syd.nexus.csiro.au>
Message-ID: <Pine.LNX.4.61.0506270934270.5029@gannet.stats>

You are correct: now fixed in R-patched and R-devel.

I have fixed this once before, so that fix must have got lost.

BTW, the sources have an explanatory comment you don't see by listing the 
function in R:  it is necessary to set m$na.action explicitly because
match.call only includes supplied arguments, not default ones.
So the lines now reads

     m$na.action <- na.action # force in even if  default


On Mon, 27 Jun 2005 Tim.Keighley at csiro.au wrote:

> Hi,
>
> I believe that the argument "na.action" is not used in the function
> pairs.formula (graphics). I am using R 2.1.1 for Windows, downloaded
> from CRAN.
>
> This is the body of the function as it is now:
>
> function (formula, data = NULL, ..., subset, na.action = stats::na.pass)
>
> {
>    m <- match.call(expand.dots = FALSE)
>    if (is.matrix(eval(m$data, parent.frame())))
>        m$data <- as.data.frame(data)
>    m$... <- NULL
>    m$na.action <- stats::na.pass
>    m[[1]] <- as.name("model.frame")
>    mf <- eval(m, parent.frame())
>    pairs(mf, ...)
> }
>
> I think the line "m$na.action <- stats::na.pass" should be "m$na.action
> <- na.action". Please correct me if I am wrong or this has already been
> fixed.

-- 
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



[Rd] Unused argument "na.action" to pairs.formula
Prof Brian Ripley