I want to map out a mostly flat area of land, 300 meters on a side.  

I want to make (x,y,z) triples where x and y vary between -150 and 150 and 
there is just one z value.


Eventually I will try to use graphics to actually draw this, but my first 
problem is that I need to get 90601 values by interpolating just 13 actual 
measurements.  The measurements are currently unsorted, which might cause 
errors with some functions, and they are in a matrix that looks like this:
      X    Y Value
1    20  135   105
2  -127   69   106
3   -98   47   107
4   -39   69   105
5    49   47   105
6   108   69   107
7    -9    3   106
8   -39    3   106
9  -127  -63   105
10  -39  -41   108
11  -39 -107   106
12   79  -63   107
13   20 -129   107


The syntax for the output seems pretty easy:
x_coord<-seq(from=-150,to=150)
y_coord<-seq(from=-150,to=150)
planebreadth=301
spaceArray<-array(0,c(planebreadth, planebreadth,1))

But what I need to do is somehow interpolate 90601 values into spaceArray, 
based on just 13 measurements.

I looked through some introductory R tutorials such as

cran.r-project.org/doc/manuals/R-intro.html

and I didn't see any examples that seemed to cover this kind of problem.



I did some web searches and there seem to be many, many ways to do 
interpolation.  There are packages like mgcv and DiceKriging.  There are 
various packages that mention splines in their descriptions, such as cobs.   

What is the easiest way to interpolate this kind of data?  Thanks.

        [[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.

Reply via email to