[R] Levelplot not working from file

2006-01-10 Thread Matt Sakals
I am trying to use the levelplot function from a command file. Here is the code: library(sp) library(gstat) library(lattice) gatherData <- read.table("~/gather.txt", header = TRUE) grd = makegrid(gatherData$x, gatherData$y, cell.size = 5) k <- krige(z~x+y, ~x+y, data = gatherData, newdata = grd,

[R] Selecting points

2006-03-01 Thread Matt Sakals
Dear all, I have point data from an irregular survey. Starting with a random point, I would like to select as many other points as possible, so long as the minimum inter-point distance is never below a given threshold. I would appreciate help in finding a nice solution. Thankyou in advance. matt

[R] add non-linear line

2007-01-17 Thread Matt Sakals
I am trying to plot a non-linear trend line along with my data. I am sure the solution is simple; any help greatly appreciated. Recent and historic attempts: fit = nls((sd~a+b*exp(-c/time)+d*geology), start=list(a=1, b=1, c=10, d=-1), model=TRUE) plot(time, sd, col=3, main = "Regression", sub=