[R] "cloud" function doesn't plot

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Jun 23 08:58:38 CEST 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".

It states completely:
"As an extension to partially support the form used in filled.contour 
and image, formula can be a matrix."
Thus, see ?image that you don't need a 3 column matrix, but a matrix 
containing the z values.

I'd suggest to convert the matrix to a data.frame and follow the 
suggestion from Simon Blomberg.

Uwe Ligges



> 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.
 >
> No plot is produced however, just a blank graphics device.

Uwe Ligges




More information about the R-help mailing list