[R] "cloud" function doesn't plot

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jun 23 08:57:52 CEST 2003


On Sun, 22 Jun 2003, Tony Ross wrote:

> >From: "Simon Blomberg" <Simon.Blomberg at anu.edu.au>
> >Date: Mon, 23 Jun 2003 16:26:39 +1000
> 
> >If you type ?cloud, you can see that you need to provide a formula as well 
> >as a dataset. So if your variables are  x,y,z in dataframe dat, then 
> >cloud(z~x*y, data=dat) should work.
> [...]
> >>is.matrix(sanity.MIF); is.numeric(sanity.MIF); dim(sanity.MIF); 
> >>cloud(sanity.MIF)
> >[1] TRUE
> >[1] TRUE
> >[1] 2970    3
> >>
> 
> The "help(cloud)" facility states: "`formula' can be a matrix". As I stated, 
> I have a 3-column numeric matrix, so colum 3 should be plotted as a point 
> above the 1st and 2nd column co-ordinates.

You are misleading yourself and us by selective quoting: it says

          As an extension to partially support the form used in
          `filled.contour' and `image', `formula' can be a matrix. 

The form used in those quoted function is *not* a three-column 
matrix, and your interpretation is not in the R help file.

> No plot is produced however, just a blank graphics device.

Not so in my experiments: a border box is drawn.

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




More information about the R-help mailing list