Dear Deepayan, I am sorry to bother you again, but I have some more questions on the R wireframe :
- when plotting an interaction between two variables, originating from a logistic model with several factors : what happens to the other variables (ie the ones not plotted)? Are they set to 0? Or to their mean? - the script to add points to the wireframe works fine now. However, I'd like to add another set of points to the wireframe (with a different symbol). How should I proceed to do this? I tried to add an additional panel.3d.wireframe and panel.3dwire statement, but apparantly I am making some kind of mistake. 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:[EMAIL PROTECTED] Verzonden: wo 30-4-2008 20:18 Aan: Strubbe Diederik Onderwerp: Re: [R] wireframe - add data points On 4/30/08, Strubbe Diederik <[EMAIL PROTECTED]> 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@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.