Displaying 20 results from an estimated 981 matches for "nearest".
2005 Nov 03
1
Help in expand.grid() (Restricted combination)
Dear Rs:
BY having the following code:
candidates<-expand.grid(e=c("nearest-neighbor","exaustive"),
d=c(70,75,80,85,90,92,94,96,98,99),
n=c(20,25,30,35,40))
results in :
e d n
1 nearest-neighbor 70 20
2 exaustive 70 20
3 nearest-neighbor 75 20
4 exaustive 75 20
................
90 exaustive 90 40
91 nearest-neighbor 92 40
92 exaustive 92 40
93 nearest-neig...
2012 Jul 24
3
Nearest Neighbors
I was wondering if there is a way in R to find k nearest neighbors of various
orders, say order 2, 3, or 4. In otherwords neighbors of neighbors of
neighbors. You get the idea. I know that I can use knearneigh(matrix.data,
k) but this only gives me the k nearest neighbors and not of a particular
order.
Thanks in advance.
--
View this message in co...
2004 Feb 02
2
Nearest Neighbor Algorithm in R -- again.
Several of the methods I use for analyzing large data sets, such as
WinGamma: determining the level of noise in data
Relief-F: estimating the influence of variables
depend on finding the k nearest neighbors of a point in a data frame or
matrix efficiently. (For large data sets it is not feasible to compute
the 'dist' matrix anyway.)
Seeing the proposed solution to "[R] distance between two matrices"
last month for finding _one_ nearest neighbor I came up with a solution
...
2008 Jan 14
6
Ceiling to the nearest ten?
R-users,
Is there a function for ceiling to the nearest ten?
a <- 1:10*4
a
[1] 4 8 12 16 20 24 28 32 36 40
The resulting vector should look like this ("ceiling to the nearest ten")
[1] 10 10 20 20 20 30 30 40 40 40
Thanks in advance
Lauri
2011 Apr 15
1
Idetntifying nearest topographic contours to data points
...x,y,z). I have
used:
result<-apply(distppll(data2,cbind(topocon[-nrow(topocon),],topocon[-1,])),1,min)
where 'data2' are my measurement coordinates (x, y) and 'topocon' are my
topographic contours (x,y). While this gives me an output of the distance
from each data point to the nearest topographic contour point, I would also
like to output the 'z' value of the nearest topographic point to each data
point. Does anyone know how I could go about this?
Ideally what I would like to output is a matrix which has:
data elevation (data2$z) distance to nearest contour eleva...
2009 Aug 17
4
Rounding to the nearest 5
Dear all,
A hopefully simple question: how do I round a series of values (held in an object) to the nearest 5? I've checked out trunc, round, floor and ceiling, but these appear to be more tailored towards rounding decimal places.
Thanks,
Steve
_________________________________________________________________
icons.
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...
2012 Jul 19
1
Truncating (rounding down) to nearest half hour.
I couldn't find anything in the chron or timeDate packages, and a good search
yielded rounding to the nearest half hour, which I don't want.
The data:
structure(list(Date = structure(c(1209625080, 1209641460, 1209652500,
1209676800, 1209682860, 1209692100, 1209706980, 1209722580, 1209726300,
1209739620, 1209762780, 1209765720, 1209770520, 1209791040, 1209812580,
1209829920, 1209837180, 1209848160,...
2020 Sep 04
2
Misleading documentation on FP to integer conversion instructions?
The LLVM IR reference manual states, for fptosi:
"The ‘fptosi’ instruction converts its floating-point
<http://llvm.org/docs/LangRef.html#t-floating> operand into the nearest
(rounding towards zero) signed integer value."
I interpreted this to mean that it rounds:
The nearest integer to 0.3 is 0.
The nearest integer to 0.9 is 1.
The nearest integer to 0.5 is either 0 or 1. And this is where the
"rounding towards zero" applies - the result is prescribe...
2005 May 25
3
Rounding fractional numbers to nearest fraction
...hat is all positive and greater than
zero that I would like to "loosely" classify, for lack of a better word. It
looks something like this :
1.07 1.11 1.27 1.59 0.97 0.76
2.23 0.98 0.71 0.88 1.19 1.02
What I'm looking for is a way to round these numbers to the nearest 0.25,
i.e. the above matrix would be transformed to :
1.00 1.00 1.25 1.50 1.00 0.75
2.25 1.00 0.75 1.00 1.25 1.00
Anyone have a clever way to do this??
Thanks in advance,
Ken
2004 Apr 06
1
k nearest neighbours
I want to
1) Select for each of the n points in a matrix A, those of the m points
in B that lay within a given radius.
2) Of those points within the radius, select the k nearest ones.
What I now do is
1) Create an n*m matrix C were I put the distances from all the points
in B to the points in A and make NA those cells were the distance is
larger than the radius. (The points are geographical locations so I use
function rdist.earth in package fields) e.g.:
library(fields...
2013 Apr 15
2
nearest stations in distance matrix
Dear R-user,
Is there a way in R to locate the nearest 5 indices to a station, based on distances in a distance matrix. In other words i want to have nearest stations based on the distances in the matrix. The distance matrix, i have, has dimension 44*44.
Thankyou very much in advance
Elisa
[[alternative HTML version deleted]]
2020 Sep 04
3
Misleading documentation on FP to integer conversion instructions?
...t;> candidate results. (see round(), ceil(), floor()).
Rounding in the IEEE 754 sense is simply an algorithm to choose one of the two closest values from some set. It does not only concern how halfway cases are handled. There are a number of rounding attributes defined by IEEE 754:
- round to nearest, ties to even (default rounding)
- round to nearest, ties away from zero (only for decimal)
- round to nearest, ties toward zero (used only for augmented addition)
- round up
- round down
- round toward zero
The last of these is the rounding mode under discussion on this thread. Note that the firs...
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...
2020 Sep 04
4
Misleading documentation on FP to integer conversion instructions?
...ep 4, 2020, at 6:26 AM, David Jones via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> The LLVM IR reference manual states, for fptosi:
>
> "The ‘fptosi’ instruction converts its floating-point
> <http://llvm.org/docs/LangRef.html#t-floating> operand into the nearest
> (rounding towards zero) signed integer value."
>
> I interpreted this to mean that it rounds:
>
> The nearest integer to 0.3 is 0.
>
> The nearest integer to 0.9 is 1.
>
> The nearest integer to 0.5 is either 0 or 1. And this is where the
> "rounding toward...
2004 Jul 08
1
k nearest neighbor prediction
Hi there fellow R-users,
Does anyone know if there is a package for k nearest neighbours prediction
as opposed to classification? I have found the package knncat but can't see
a way to adjust it to predict a continuous variable.
Any help would be great,
Regards
Wayne Jones
KSS Ltd
Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS Engl...
2009 Sep 16
1
Is there a way to round numbers up or down to the nearest "natural looking" number?
Hi all,
Given the following series of numbers:
> t
[1] 21.85000 30.90410 43.71000 61.82234 87.43999 123.67296
[7] 174.91997 247.40249 349.91996 494.91815 700.00000
What's the simplest way of formatting them into the nearest "natural
looking" (rounded to nearest multiple of 10) numbers?
So:
t[1] becomes 20
t[2] becomes 30
t[3] becomes 40
t[4] becomes 60
t[5] becomes 90
t[6] becomes 120, etc ?
Thus far I've tried signif(t,2) but that's not working great..
Any help would be much appreciated,
Thanks...
2001 Jan 10
2
nearest neighbors
Is there an implementation of a reasonable k-nearest neighbor finder
already in one of the packages?
--
+---------------------------------------------------------------------------+
| Robert Gentleman phone : (617) 632-5250 |
| Associate Professor fax: (617) 632-2444 |
| Department...
2003 Jan 30
2
nearest neighbour interpolation
...not very
good at programming so I thought I would ask the group.
I have an irregular grid of data (x = Longitude, y = Latitude). Each pair of my x,y
has a categorical value. Obviously linear or any other numerically based
interpolation on categorical data does not make sense, so I want to use a nearest
neighbor interpolation so that I can extrapolate my irregular grid to a regular grid
of Longitude and Latitude.
Please help!
Thanks again
Matt Oliver
Institute of Marine and Coastal Sciences
Rutgers University, New Brunswick, NJ
07728 oliver at imcs.rutgers.edu
2016 Apr 04
4
[Bug 94817] New: Nearest neighbor scaling?
https://bugs.freedesktop.org/show_bug.cgi?id=94817
Bug ID: 94817
Summary: Nearest neighbor scaling?
Product: xorg
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: enhancement
Priority: medium
Component: Driver/nouveau
Assignee: nouveau at lists.freedesktop.org...