Re: [R] wireframe advice - with reproducible code

From: Chris Mcowen <chrismcowen_at_gmail.com>
Date: Mon, 16 May 2011 16:17:10 +0100

Thanks for this,

With the data i have what is the best method to convert it into the required matrix, as i am a little unsure how it would be done - i imagine this must be a common task?

Chris
On 16 May 2011, at 16:05, Duncan Murdoch wrote:

On 16/05/2011 10:57 AM, Chris Mcowen wrote:
> Sorry,
>
> My bad -
>
> I have notice you can remove the data call when using this and it works the same, also FD is the same as Residual_FD i just forgot i coded it different.
>
> wireframe(FD ~ Elevation * Temperature, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE)
>
> Sorry and thanks again,
>

Those points don't form a surface that wireframe could draw. cloud() would work, but if you want a wireframe surface, then the FD values need to be something like what persp() needs: a matrix of values, with rows and columns being combined values from Elevation and Temperature. wireframe() is different in that the matrix is presented as a column in the data, with the rows and columns repeated correspondingly.

See the g dataframe produced in example(wireframe) for an example of the right sort of structure.

Duncan Murdoch



R-help_at_r-project.org 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 Mon 16 May 2011 - 15:20:11 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Mon 16 May 2011 - 15:40:07 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.

list of date sections of archive