I work with a large list of points (each point has three dimensions x, y, z).
I am new to R, so I would like to know what is the best way to present such information. As far as I know, the array allows me to represent any multidimensional data, so currently I'm using:
> points<-array( c(1,2,0,1,3,0,2,4,0,2,5,0,2,7,0,3,8,0), dim=c(3,6) )
> points
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 1 1 2 2 2 3 -- x dim
[2,] 2 3 4 5 7 8 -- y dim
[3,] 0 0 0 0 0 0 -- z dim
The goal is to perform some calculations to calculate the Euclidean distance between two sets of points, such as:
points1<-array( c(1,2,0,1,3,0,2,4,0,2,5,0,2,7,0,3,8,0), dim=c(3,6) )
points2<-array( c(2,2,0,1,4,0,2,3,0,2,4,0,2,6,0,2,8,0), dim=c(3,6) )
(any hint in this sense would also be greatly appreciated)