Displaying 20 results from an estimated 10000 matches similar to: "PR#4195"
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
2011 Jun 09
1
k-nn hierarchical clustering
Hi there,
is there any R-function for k-nearest neighbour agglomerative hierarchical
clustering?
By this I mean standard agglomerative hierarchical clustering as in hclust
or agnes, but with the k-nearest neighbour distance between clusters used
on the higher levels where there are at least k>1 distances between two
clusters (single linkage is 1-nearest neighbour clustering)?
Best regards,
2006 Mar 09
1
HCLUST subroutine question -- FORTRAN DO loops
Shown below is most of the FORTRAN subroutine named HCLUST.
My question concerns the DO loop labeled as '10'. What happened to its
CONTINUE statement? I will assume that after FLAG(I)=.TRUE. is executed that
control returns to DO 10 I=1,N. Am I correct?
Dave
----------------------------
C Initializations
C
DO 10 I=1,N
C We do not initialize MEMBR in order to be able to
1997 Sep 05
2
R-beta: help with R simulation
[[this bounced first, because it has 'help' in the Subject line ...
-- Martin Maechler
]]
I am a complete novice R programmer. (Though I know C quite well)
I am trying to write some R code to do the following simulation.
There is a 2-frame "movie" of noise and signal dots. the noise
dots have random positions in each frame. The signal dots are
placed randomly in frame 1,
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
2007 Apr 11
1
Random Forest Imputations
Dear All,
I am not able to run the random forest with my dataset..
X<- 280 records with satellite data(28 columns) - B1min, b1max, b1std etc..
y<- 280 records with 3 columns - TotBasal Area, Stem density and Volume
yref <- y[1:230,] #Keeping 1st 230 records as reference records
want to set 0 to y values for records 231 to 280..
yimp <- y[231:280,] #records for which we want
2008 Jun 02
0
(PR#11537) help (using ?) does not handle trailing whitespace
>>>>> "BDR" == Prof Brian Ripley <ripley at stats.ox.ac.uk>
>>>>> on Fri, 30 May 2008 22:34:28 +0100 (BST) writes:
BDR> I think it is ESS that is parsing this as a help
BDR> request (so it can divert it to an ESS buffer).
BDR> Looks like this is an ESS issue, not an R one.
yes, indeed, hence much more belonging the ESS-help
2012 Jul 24
1
unable to run spatial lag and error models on large data
Hi:
First my apologies for cross-posting. A few days back I posted my queries ar R-sig-geo but did not get any response. Hence this post.
I am working on two parcel-level housing dataset to estimate the impact of various variables on home sale prices.
I created the spatial weight metrics in ArcGIS 10 using sale
year of four nearest houses to assign weights. Next, I ran LM tests and
then ran
2004 Jun 22
1
k nearest neighbours
Hi there fellow R-users,
Does anyone know of a function which does exactly what knearneigh{spdep}
(finds the k nearest neighbours) does in the package spdep but for more than
2D data?
Regards
Wayne
KSS Ltd
Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS England
Company Registration Number 2800886
Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305
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 England
Company
2010 Mar 09
1
create picture (k -the nearest neighbours)
Hi
I want to create a nice picture about my result of k -the nearest neighbours
algorithm. Here is my easy code:
#################################
library(klaR)
library(ipred)
library(mlbench)
data(PimaIndiansDiabetes2)
dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)]
dane[,2]=log(dane[,2])
dane[,1:2]=scale(dane[,1:2])
zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F)
2009 Sep 04
0
passing character vectors to FORTRAN
Hi,
I've been trying to pass a character vector from R to a FORTRAN subroutine. There have been several posts discussing this issue (e.g. http://tolstoy.newcastle.edu.au/R/help/98a/0547.html, http://tolstoy.newcastle.edu.au/R/help/05/10/13558.html, http://tolstoy.newcastle.edu.au/R/help/01a/2577.html, http://tolstoy.newcastle.edu.au/R/help/01c/1795.html,
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
2004 Dec 15
3
Massive clustering job?
Hi,
I have ~40,000 rows in a database, each of which contains an id column and
20 additional columns of count data.
I want to cluster the rows based on these count vectors.
Their are ~1.6 billion possible 'distances' between pairs of vectors
(cells in my distance matrix), so I need to do something smart.
Can R somehow handle this?
My first thought was to index the database with
2008 May 13
2
(PR#11281) Bug in R 2.7 for over long lines (crasher+proposed fix!)
>>>>> "BDR" == Prof Brian Ripley <ripley at stats.ox.ac.uk>
>>>>> on Tue, 13 May 2008 07:32:43 +0100 (BST) writes:
BDR> This example does not crash in R 2.7.0, R-patched nor
BDR> R-devel (r45677) for me (x86_64 F8 Linux.) It also
BDR> does not crash with the CRAN build of R 2.7.0 on
BDR> Windows XP.
Neither does it
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
2009 Apr 07
2
Minimum Spanning Tree
Hi all, I'm very new to R and read a few tutorials, however I'm having
difficulty trying to figure out how to plot a minimum spanning tree. I have
a csv file that contains an n-by-n matrix of distances between strains of
bacteria called matrix.csv.
Looks like:
id,strain1, strain2,strain3
strain1,0,.2,.8
strain2,.3,0,.7
strain3,.4,.6,0
I've been messing around with some information
2000 Mar 07
0
Re: autoload error in profile {was anova-bug in R-version 1.0.0?} (PR#473)
On Tue, 7 Mar 2000, Martin Maechler wrote:
> >>>>> "BDR" == Prof Brian D Ripley <ripley@stats.ox.ac.uk> writes:
>
> BDR> On Tue, 7 Mar 2000, Trenkler, Dietrich wrote:
> >> I think I've discovered what went wrong.
> >>
> >> My workspace included a function wilcox.test formerly copied from
> >>
2013 Apr 16
1
Spatial Ananlysis: zero.policy=TRUE doesn't work for no neighbour regions??
Hello,
I'm new to R and to Spatial Analysis and got a problem trying to create a
Spatial Weights Matrix.
*I us the following code to create the Neighbourslist:*
>library(maptools)
>library(spdep)
>library(rgdal)
>location_County<- readShapePoly("....")
>proj4string(location_County)<- CRS("+proj=longlat ellps=WGS84")
>location_nbq<-