Re: [R] wireframe - add data points

From: Strubbe Diederik <diederik.strubbe_at_ua.ac.be>
Date: Sat, 03 May 2008 20:48:07 +0200

Dear Deepayan,

I am sorry to bother you again, but I have some more questions on the R wireframe :

Many thanks,  

Diederik  

Diederik Strubbe
Evolutionary Ecology Group
Department of Biology, University of Antwerp Universiteitsplein 1
B-2610 Antwerp, Belgium
http://webhost.ua.ac.be/deco
tel : 32 3 820 23 85


Van: Deepayan Sarkar [mailto:deepayan.sarkar_at_gmail.com] Verzonden: wo 30-4-2008 20:18
Aan: Strubbe Diederik
Onderwerp: Re: [R] wireframe - add data points

On 4/30/08, Strubbe Diederik <diederik.strubbe_at_ua.ac.be> wrote:
>
>
>
> Hello,
>
> The output of str(pts) is :
>
> 'data.frame': 123 obs. of 3 variables:
> $ x: Factor w/ 88 levels "-0,001290574",..: 33 30 19 42 39 32 21 21 13 38
> ...
> $ y: Factor w/ 111 levels "-0,076738454",..: 108 103 110 83 90 95 104 104
> 111 70 ...
> $ z: Factor w/ 113 levels "0,00432948","0,008508508",..: 1 2 3 4 5 6 7 7 8
> 9 ...
>
>
> The data look like :
> status totalfrost logTPS logPD logWinterp
> 1 0.00 0.53 1.21 0.08
> 1 -0.04 -0.24 0.13 -0.83
> 0 -0.07 0.99 1.12 -0.66
> 1 0.10 -1.99 -1.58 0.92
> 0 -0.14 -0.88 -0.60 -0.26
> 1 0.16 0.62 0.62 0.08
> 0 -0.17 -1.87 -0.03 -0.44
> 0 -0.17 -1.76 -1.24 0.43
> 1 -0.18 0.86 0.54 -0.47
> 1 -0.18 0.86 0.54 -0.47
> 0 0.21 -1.02 -0.32 0.65
> 0 0.21 -1.78 -1.62 -0.37
> 0 0.21 -2.36 -0.95 -0.02
> 1 0.21 -0.47 0.35 0.21
> 0 0.21 -0.63 -1.28 -0.02
> 0 0.21 -0.58 -0.08 -0.02
> 0 0.21 0.51 0.47 -0.02
> 0 0.21 -1.55 -0.32 0.63
> .....
>
> With the points that I'd like to add to the wireframe as :
>
> totalfrost logtps z
> -1,54069 1,292944 0,004329
> -1,4455 1,101941 0,008509
> -1,00393 1,604134 0,00984
> -1,80995 0,59885 0,013043
> -1,68756 0,67048 0,013816
> -1,50534 0,809675 0,01441
> -1,05929 1,150182 0,019563
> -1,05929 1,150182 0,019563
> -0,70524 1,691427 0,020248
> .......
>
>
> Hope this helps and many thanks!!

It should help you: as the message suggests, pts$x etc. are factors (I'm guessing because of the use of commas for the decimal point), whereas you want them to be numeric. In other words, the problem is not in your wireframe code, it's in your data preprocessing.

-Deepayan

        [[alternative HTML version deleted]]



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 Sat 03 May 2008 - 19:24:12 GMT

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 Sat 03 May 2008 - 19:30:37 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