search for: xkj

Displaying 3 results from an estimated 3 matches for "xkj".

Did you mean: kj
2001 Nov 21
2
distances from points to line
Dear all, I have discovered that there are many things that I used to do in my GIS which are easily done directly in R, for example calculating interpoint distances using geoR and pick out points inside a polygon using splancs. I now wonder, is there a function to create a line object like a watercourse and then calculate the distances between many points in space and this line? I couldn't
2008 Jan 07
1
Avoiding FOR loops
...5 1.75 0.5 5 3.75 1.75 0.5 6 4.75 1.75 0.5 7 5.75 1.75 0.5 8 6.75 1.75 0.5 9 7.75 1.75 0.5 10 -0.25 2.75 0.5 Here, X is a matrix of 3 variables in which each is of size 5 and XK are some values that correspond to each variable. For each variable, I want to do: |Xi - xkj| where i = 1 to 3 and j = 1 to 10 It looks as if a double FOR loop would work, but can the apply function work? Or some other function that is shorter than a FOR loop? Thank you, I hope this makes sense. Derek -- View this message in context: http://www.nabble.com/Avoiding-FOR-loops-tp1465...
2007 Aug 29
0
a faster and shorter way to perform calculations?
This is a continuation from a previous posting of mine: The following algorithm below is what I want to accomplish: Z(xk) = Average(Yi, i belongs to Ik), where Ik contains all i such that for each j, |Xi,j - xkj?? 2. Here, j = 1, 2 and i corresponds to the elements in each X and/or xk >data x1 x2 y 1 1 2 2 2 6 3 3 12 Now, consider a second data frame or matrix (xk): xk1 xk2 0.5 0.5 1.0 0.5 1.5 0.5 2.0 0.5 0.5 1 1.0 1 1.5 1 2.0 1 0.5 1.5 1.0 1.5...