Displaying 20 results from an estimated 800 matches similar to: "Distance matrix in SpDep-package"
2008 May 13
2
Permutations
Dear R-users,
Is there an easy way to determine all possible vectors of length 21 with
each entry having permutations from 0 to 4, instead of doing it like this?
It really takes up too much time, and I am convinced that there exists
something easier.
Can you help me? Thank you in advance!
Kind regards,
Elke
for (a in 0:4){
for (b in 0:4){
for (c in 0:4){
for (d in 0:4){
2009 Jul 14
1
Error when sampling from SpatialLines
Dear forum,
I am working in R 2.9.1 and I am trying to sample locations from a network file. Reading in nor plotting is a problem, however when I am trying to sample from the file I get the following message:
nwlim<-readShapeLines("C:/Limburg_nwshape", proj4string=CRS("+init=epsg:31300"))
plot(nwlim)
randacc<-spsample(nwlim,n=1000,"random")
2007 Dec 17
1
polygon class in splancs package
Dear forum,
I would like to use the kernel2d or spkernel2d in the Splancs-package, but
it does not recognize my polygon data.
"Error in kernel2d(as.points(ptsbin), polygonprov, h0 = 2, nx = 100, : " is
the error message.
Invalid poly argument
The data are defined as follows:
polgonprov<-list(x=polyprov$X, y=polyprov$Y) with X and Y coordinates in the
Lambert1972
2009 Jan 07
1
troubles performing Moran.I test
dear R users,
I have troubles performing Moran.I test as suggested on
http://www.ats.ucla.edu/stat/r/faq/morans_i.htm
my spatial data are longitude and lattitide of communities. The
calculation of the inverse distance matrix according to the homepage
(using my data)
datAL <- read.csv2("C:\\Konvergenz AL.csv", header=T)
ALdist <- as.matrix(dist(cbind(datAL$L?nge,
2013 Nov 29
1
mat2listw function
Hi all,
I am attempting to create a weights object and perform a Moran I test as
well. I have a very large spatial weights matrix (roughly 22,000x22,000)
that was created in Excel and read into R, and I'm now trying to implement:
library(spdep)
SW=mat2listw(matrix)
I am getting the following error:
Error in if (any(x<0)) stop ("values in x cannot be negative"): missing
value
2005 Jan 30
1
New user...tips for spdep
[This email is either empty or too large to be displayed at this time]
2007 Dec 14
0
kernel density in space
Hello everybody,
I would like to determine kernel densities along a maze. I have distances
from each point of the maze to its neighbours and I managed by means of the
mat2listw-function in the Spdep package to assign neighbours to each point.
Each point now has a value for a Z-variable and it is this variable that I
would like to use to determine a density for each point with neighbours
2003 Dec 09
0
The spdep package
Hi,
Here is a listw object z corresponding to the matrix W. I understand n,
nn, S0, S1 and S2 in the weights constants summary. Is it simply so that
n1 = n-1, n2 = n-2 and n3 = n-3? If this is true where they are needed?
Just wondering
Osmo
> W
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
[1,] 0 1 0 1 0 0 0 0 0
[2,] 1 0 1 0 1 0
2003 Aug 07
0
spdep error message
Hello,
I have been using the package "spdep" to run spatial regressions on a data set
with about 2500 observations. It has performed well up until now, but the
following code resulted in an error:
> load("Panel.90s.ok.R")
> attach(Panel.90s.ok)
> neighs<-dnearneigh(cbind(x,y),0,50000)
> help(nbdists)
> dists<-nbdists(neighs,cbind(x,y))
>
2003 Jul 11
0
spdep
Hi everyone,
The Spatial Dependence (spdep) library, has a function called 'dnearneigh', which identifies neighbours of region points by Euclidean distance between lower (greater than) and upper (less than or equal to) bounds. The function returns a list of integer vectors giving the region id numbers for neighbours satisfying the distance criteria.
I have used this to identify the
2013 Jan 10
0
r-help
-- _______________________________ Paul K. Musingila University of
Hasselt, I-Biostat, Diepenbeek, Belgium Mobile: +254-724-423532,
+32-48-637-4558 E-mail: paul.musingila at student.uhasselt.be,
pmusingila at gmail.com Skype: pmusingila "When darkness overtakes the
godly, light will come bursting in" Psalm 112:4
2008 Oct 08
1
Error in spdep: system is computationally singular
Hi all,
I am trying to run an autologistic model using the function errorsarlm from spdep package.
**I built an XY matrix extracting the two colums from matriz**
coords1<-matriz[matriz$casos1==1, c(4,5)]
coords1<-as.matrix(coords1)
**I identify neighbours of region points**
nb20<-dnearneigh(coords1,0,20,longlat=TRUE)
** I build a neighbours list with spatial weights**
2005 Jan 30
1
New user...tips for spdep?
Hello List,
I'm a very new user to the R system. I'm only beginning to learn the
basics, but so far I've been able to do little more than try a few examples,
and of course begin reading the documentation.
My primary motivation for exploring R is the availability of tools like the
'spdep' package for calculating spatial statistics such as Geary's C and
Moran's
2004 Aug 19
3
Do you know if you can map a large minimum spanning tree in R?
Thanks Mike.
My data has longitude and latitude coords and I used distAB {clim.pact}
then mst {ape} to calculate my minimum spanning tree. The nodes are
telecoms sites from all over Australia. My goal is to determine the
minimum cost of linking them via cabling, and I'm starting by
calculating the distance "as the crow flies", but will probably
eventually need to calculate the
2007 Dec 21
1
matrix to gal object
useR's
I need transform the matrix
wdat
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 0 1 0 1 1 0
[2,] 1 0 0 1 1 0
[3,] 0 0 0 0 1 1
[4,] 1 1 0 0 1 0
[5,] 1 1 1 1 0 0
[6,] 0 0 1 0 0 0
to gal object. How I do with spdep?
Thanks in advance for the help.
Bernardo.
University of Concepci?.
2003 Dec 15
2
Error with spdep
Dear useRs:
First of all I would like to thank all the responses.
I've an error with package "spdep".
I am working with a Windows XP machine (AMD-2000-XP RAM-256DDR) and 1.8.0.
R-version and when I try to load spdep appear the following error:
> library(spdep)
Error in loadNamespace(i, c(lib.loc, .libPaths()), keep.source) :
There is no package called
2004 Jan 05
2
Installing spdep
Hello all,
I am trying to install the package 'spdep' and get the following error message when I invoke library(spdep) at the R prompt:
Error in loadNamespace(i, c(lib.loc, .libPaths()), keep.source)
There is no package called 'maptools'
Error in library(spdep) : package/namespace load failed
I get this if I try to install 'on the fly' AND if I download directly from
2001 Feb 07
1
[Fwd: RedHat 7.0, Wine en Matlab: een fontprobleem??]
Beste,
ik heb getracht om Matlab (versie 6.0.0.88 Release 12 op Win98 op
aparte partitie op mijn hd) mbv wine te draain op mijn RedHat 7.0.
Het betreft codeweavers-wine, versie 20010112.
Matlab start heel fijn op, wine spuwt een proces of 15 en vreet
zowat al mijn geheugen op maar voor de rest lijkt hij wel te werken.
(Andere
applicaties zoals notepad, wordpad, freecell, etc werkten perfect..)
2008 Mar 31
1
GeoDa spdep
My question is in regard to the spdep and GeoDa packages. Do you know how
to extract a neighborhood/adjacency matrix from R? I need a matrix that has
all the neighborhoods on the X and Y axis, and then a r=1 when the
neighborhoods touch, and a r=0 when neighborhoods don't touch. I
think the Moran's I functions use a matrix like this when they estimate
Moran's I. I can estimate
2009 Jun 06
1
large numbers of observations using ME() of spdep
Dear All,
We aim to remove the spatial structure of our data using Moran Eigen
Vectors and spdep package . Our data has 3694 samples and 13
variables.
The computer stop working after almost 4 days of processing (we found
it emitting a sharp sound and with all colors on the screen. No
wories, it was restared without problem!). And we are left with
nothing: no result file was produced since the