[R] 3D plots with data.frame
H. Paul Benton
hpbenton at scripps.edu
Fri May 25 23:40:06 CEST 2007
Dear all,
Thank you for any help. I have a data.frame and would like to plot
it in 3D. I have tried wireframe() and cloud(), I got
scatterplot3d(xs)
Error: could not find function "scatterplot3d"
> wireframe(xs)
Error in wireframe(xs) : no applicable method for "wireframe"
> persp(x=x, y=y, z=xs)
Error in persp.default(x = x, y = y, z = xs) :
(list) object cannot be coerced to 'double'
> class(xs)
[1] "data.frame"
Where x and y were a sequence of my min -> max by 50 of xs[,1] and xs[,2].
my data is/looks like:
> dim(xs)
[1] 400 4
> xs[1:5,]
x y Z1 Z2
1 27172.4 19062.4 0 128
2 27000.9 19077.8 0 0
3 27016.8 19077.5 0 0
4 27029.5 19077.3 0 0
5 27045.4 19077.0 0 0
Cheers,
Paul
--
Research Technician
Mass Spectrometry
o The
/
o Scripps
\
o Research
/
o Institute
More information about the R-help
mailing list