similar to: nearest neighbour interpolation

Displaying 20 results from an estimated 6000 matches similar to: "nearest neighbour interpolation"

2009 Nov 17
0
Re place NA values in matrix with the value of Nearest Neighbour
I am extracting climate data for coastal areas from 5km grid data for specific xy coordinates that relates to individual study sites (SQ). Code so far: setwd("/Users/roblewis/Documents/PhD/Climate Data") fnamestemp=read.table("Path_Directory_Maxt") fnames=paste(fnamestemp[,1],fnamestemp[,2]) nfiles = length(fnames) xy=as.matrix(read.table("xy_.txt"))
2011 Sep 26
3
Nearest neighbour in a matrix
Hello all, I am brand new to R and doing an exercise for a class. I need to find the nearest neighbour for points in the following matrix: > DistanceMatrix x1 x2 x3 x4 x5 [1,] 0.000000 2.828427 1.581139 2.236068 2.000000 [2,] 2.828427 0.000000 1.581139 4.123106 2.000000 [3,] 1.581139 1.581139 0.000000 2.549510 2.121320 [4,] 2.236068 4.123106 2.549510
2008 Sep 01
2
Interpolation Problems
Dear all, I'm trying to interpolate a dataset to give it twice as many values (I'm giving the dataset a finer resolution by interpolating from 1 degree to 0.5 degrees) to match that of a corresponding dataset. I have the data in both a data frame format (longitude column header values along the top with latitude row header values down the side) or column format (in the format latitude,
2009 Jun 21
1
Problems with bilinear interpolation of a grid
Dear all, I'm having trouble interpolating a number of gridded datasets that I have. I'm quite new to R so any help/advice that can be offered would be much appreciated! Firstly I'll describe my dataset. The data is a grid of the planet at 1 degree spatial resolution, with each grid cell containing a value describing a particular variable (e.g. population density) for coordinate
2010 Feb 04
2
2 dimensional interpolation from matlab to R
Hi everybody. i have 2 datasets : one with a long grid a lat grid and a bathymetry grid the second one only has the long and lat coordinates. So i want to know the bathymetry associated to the second dataset. I thought it was a good idea to do an interpolation between the two datasets. I find a script doing that on matlab but i want to do it on R. Do you how to do it? for ii =
2013 Apr 04
5
help with kriging interpolation
All, I am new to using R and know some basics. I wish to use kriging in R to do the following: given data Y =f(X1,X2,X3,.....,Xn) --1000+ irregular measured data set. I would like to be able to get a single value y given sinle input set (x1,x2,x3,...xn) A google search on this takes me lierally to the same example on involving analysis with soil sampling and I cannot figure out how to
2001 Feb 28
1
re: Spatial stats: R vs. Splus
Hello, Could someone tell me whether the spatial statistics module of Splus is worth the rather high price, or whether one could (with reasonable effort) carry out the same things using R and some of its contributed packages. Although we do have Splus (Windows and Unix), we definitely prefer to use R whenever feasible (both for research and teaching). Thanks for developing a superb
2007 Dec 04
1
2/3d interpolation from a regular grid to another regular grid
Hello R users, I have numerical data sampled on two grids, each one shifted by 0.5 from the other. For example: grid1 = expand.grid(x=0:3, y=0.5:2.5) grid2 = expand.grid(x=0.5:2.5, y=0:3) gridFinal = expand.grid(x=0.5:2.5, y=0.5:2.5) plot(gridFinal, xlim=c(0,3), ylim=c(0,3), col="black", pch=19) points(grid1, xlim=c(0,3), ylim=c(0,3), col="red", pch=19) points(grid2,
2004 Feb 25
0
k nearest neighbours between two matrix
I have two dataframes A and B consisting of latitude longitude coordinates of points. For each point in A I want to find the k-nearest neighbours in B. Currently, I calculate the distance from each point in A to all the points in B (using rdist.earth() in fields package), sort the points of B by distance and select the k nearest ones. Is there a more efficient way to do this? Function knearneigh
2003 Oct 11
1
interpolation methods
Hello all, I want to interpolate some data i prepared in GRASS, so I'm looking for what interpolation methods are available for R. In GRASS I can do Splines with tension and IDW. I'm looking for something like multiquadric equations. Is there any function/package available fo rthis? thanks all -- +-------------------------------------------------+ Carlos Henrique Grohmann de
2012 Jun 20
1
nearest neighbours and their ID
Dear R users, I used nndist() to gain the distance of 2 nearest neighbours of the points in my dataset. Is there a way of getting the ID numbers of these nearest neighbours (along with their distances). The command I used: nn2 <- nndist(X2, k=1:2). This is the output of the nearest neighbour distances I got (the IDs of the given points are there but their IDs aren't). Any help or
2006 Jun 15
3
MDS with missing data?
Hello I will be applying MDS (actually Isomap) to make a psychological "concept map" of the similarities between N concepts. I would like to scale to a large number of concepts, however, the resulting N*(N-1) pairwise similarities is prohibitive for a user survey. I'm thinking of giving people random subsets of the pairwise similarities. Does anyone have recommendations for this
2004 May 28
6
distance in the function kmeans
Hi, I want to know which distance is using in the function kmeans and if we can change this distance. Indeed, in the function pam, we can put a distance matrix in parameter (by the line "pam<-pam(dist(matrixdata),k=7)" ) but we can't do it in the function kmeans, we have to put the matrix of data directly ... Thanks in advance, Nicolas BOUGET
2001 Sep 01
2
interpolation and numerical differentiation in R ?
Hi, I'm trying to determine if R is useful to me. I've browsed 'The Basics of S and S-Plus' (Krause & Olson), and like the logic of the language. However, I don't see an easy way to do things like this: * given a set of observations (x,y) (x and y equal-length vectors), and a 2nd set of abscissas x2, interpolate y at the new abscissas x2. (for now, I don't really
2001 Mar 05
1
Canberra dist and double zeros
Canberra distance is defined in function `dist' (standard library `mva') as sum(|x_i - y_i| / |x_i + y_i|) Obviously this is undefined for cases where both x_i and y_i are zeros. Since double zeros are common in many data sets, this is a nuisance. In our field (from which the distance is coming), it is customary to remove double zeros: contribution to distance is zero when both x_i
2001 Mar 05
1
Canberra dist and double zeros
Canberra distance is defined in function `dist' (standard library `mva') as sum(|x_i - y_i| / |x_i + y_i|) Obviously this is undefined for cases where both x_i and y_i are zeros. Since double zeros are common in many data sets, this is a nuisance. In our field (from which the distance is coming), it is customary to remove double zeros: contribution to distance is zero when both x_i
2005 Oct 06
5
Interpolation in time
Can anybody help me write a code on the following data example, which fills out all NA values by using a linear interpolation with the two closest values? Doy is day of year (%j). Code example: yr<-c(rep(2000,14)) doy<-c(16:29) dat<-c(3.2,NA,NA,NA,NA,NA,NA,5.1,NA,NA,NA,NA,NA,4.6) ta<-cbind(yr,doy,dat) ta yr doy dat [1,] 2000 16 3.2 [2,] 2000 17 NA [3,] 2000 18 NA
2011 Dec 24
1
linear interpolation of time series
Dear R users, I have two irregular time series say x and y. Each series is supposed to cover 20 years. The data looks, for instance: x<-c(200,178, 330, 127, 420) ## only 5 observations out of the expected 20 annual values y<-c(0.35,-0.18,-0.54,0.78,1.7,-1.1,0.2,1.9,0.49)### only 9 observations of the expected 20 I need to intepolate each of the series into equally spaced 20 points. Is
2004 Nov 07
1
rgl on Mac OS
Hi, It seems like a number of people on this list can install rgl but have problem loading it. I found myself in the same situation too. I have tried the workaround of removing /usr/X11R6/lib from DYLD_LIBRARY_PATH, but it doesn't seem to work for me, I am still getting the same error (that everyone else seems to get). Can anyone give me some ideas on what else to try? I have Mac OS 10.3.5,
2005 Aug 08
2
INDVAL and mvpart
Hi, I'd like to perform Dufrene-Legendre Indicator Species Analysis for a multivariate regression tree. However I have problems with arguments of duleg(veg,class,numitr=1000)function. How to obtain a vector of numeric class memberships for samples, or a classification object returned from mvpart? thanks in advance -- Best regards, Agnieszka Strzelczak