similar to: neighbor.grid and spatial.weights

Displaying 20 results from an estimated 1000 matches similar to: "neighbor.grid and spatial.weights"

2010 Jun 20
3
Spatial: number of independent components?
Hi all, I am sorry if this is a very basic quesion, but I have no experience with analyzing spatial data and could not find the right function/package quickly. Any hints would be much appreciated. I have a matrix of spatial point patterns like the one below and want to find the number of independent components (if that's the right term) in that matrix (or in that image). x=matrix(c(0,1,0,0,0,
2005 Apr 20
7
A question about function behavior
Hello, I have been trying to figure this one out, but don't seem to go anywhere. I have a function like this: a = function(t) { max(0,t+1) } very simple, but if I pass a vector of n values to this function I expect n evaluations of max and instead I get only one value (the largest value of them all..). Is there anyway to do this without invoking a for loop? thanks, Jorge
2001 Oct 22
1
statistics for ragged arrays: loop to vector
Dear R users, I am currently writing a MCMC algorithm for spatial Poisson model. One problem which I need to solve is as follows: I have a vector X[1:J] which describes characteristics of cells of a rectangular grid. Further, for each cell I have a list of adjascent cells adj[] and the vector listing numbed of adjascent cells num[]. Thus if I want to list cells adjascent to cell i I write
2002 Sep 11
1
Question about spatial statistics
I?m tryng to use the SPDEP package in my research in the field of population genetics. My data set has the following format: - x and y : coordinates, - Z: allelic frequency in each loci (in a total of 8 locis) - this variable can assume the values 0 ; 0.5 or 1. The objective is to verify if there is a possible spatial autocorrelation structure of the allelic frequency in a population of
2002 Mar 20
4
spatial library
Hi everybody, I want to download the spatial library but I don't find it at the CRAN list package. Where can I find the package ? I have to download it to use the function correlogram. Thanks in advance, Paola. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2005 Aug 03
1
help for cell2nb and queencell in spdep package
Dear Dr. Bivand and R-users, I have a 5 by 5 grid, say, location[1:5,1:5], and I want to know the indices of 8 neighbours of each cell. For example, for location[2,2], its neighbour coordinates are [1,1:3], [2,1], [2,3] and [3,1:3]. Sometimes I also need to remove edge effects (torus = TRUE). I have tried "cell2nb" function in your spdep package. Here's my example: > neigh
2003 May 21
1
help on spatial data
Hi, I have a dataset with x and y coordinates and in each point I have an identity of point, in some cases I can have more then one identity by point. My dataset is something like this: > x <- rep(c(1:4),4) > y <- rep(c(1:4),c(4,4,4,4)) > area1 <- sample(factor(rep(c("a","b","c","d"),4))) > area2 <-
2010 Jul 27
6
Eval() or parse() do not work inside function
I am writing a function where the arguments are names of objects or variable names in a data frame. To convert the strings to the objects I am using eval(parse(text=name)): f.graph.two.vbs<-function(dataname,v1){ val<-paste(dataname,v1,sep="$") val<-eval(parse(text=val)) val } However running this returns an error:
2013 Nov 20
2
Multiple if statement in loop condition
What this message means is that a "{" showed up when some other bracket was unpaired. In this case, if you check your code, you'll see that "if(MatriceDist[i,j] > 0 & ((vectorID[i] > 0 | vectorID[j] > 0))" is lacking a closing ")" for the if clause. Phalaen wrote > Hi! > I am a Phd student in the university of Padua and I am trying to
2001 Jun 02
2
inout() in splancs working properly?
I have a problem with function 'inout()' in package 'splancs' on CRAN-R Version 1.2.3 under FreeBSD4.3-STABLE. The following script produces and draws points and a polygon-surrounded area. Repeating the same script many times shows, that points on the polygon-line often, but not always, are outside of the polygon-area. library(splancs) # dataset with polygon (convex
2001 Jul 06
1
output of system() call not returned in Win98
On one machine running Win98 and R 1.2.2 this command works: system("command.com /c dir",show=T,invisible=T) On another machine also running Win98 and R 1.2.2 it does not. Nothing appears. On another machine running Win98 and R 1.3.0 it also does not work. Is this a known problem? Many thanks for any help. Nick Barrowman, Ph.D. Thomas C. Chalmers Centre for Systematic Reviews
2002 Aug 07
2
ftell and fseek
Hi, I'm stumped. How can I do ftell and fseek in R? (Where ftell gives the position in the file and fseek points the file pointer to a given position.) Thanks, Pauline -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2002 Aug 16
2
system command
Hello, It is very simple question. I want to go to the parent directory and give the 'system("cd ../") commnad. But it stayes at the same dirctory as before. Do I forget to give some extra parameter to system command in this case? Regards, Nader -------------------------------------------------------------- Zie ook/see also: http://www.knmi.nl/maildisclaimer.html
2002 Mar 21
2
table of variance analysis
Hello everybody ! I want to evaluate the goodness of the fit of a trend surface. I use the Least square methods and the function surf.ls. The I write tma3.sur3 <- surf.ls(3, x, y, z) summary(tma3.sur3) Now the question: is the Pr(>F) the probability to obtain a value of F equal or greater than the obtained one ? Is the confidence level 0.05 ? Thanks a lot for any help. Paola.
2001 Apr 26
2
little question
Hi all, i have a little pb but i don t find how i can solve it.. this is.. i have two vectors x and yn and they don t have the same length... (i suppose length(x)>length(y)) this is what i want to do. i suppose that x=c(10,1,2,3,7,9,1,4,2,11,2,10) and y=c(1,2,4,10) i want to find all the numbers of rows i of x for which x[i] exists in y ... i.e. in this case ...rep=(1,2,3,7,8,9,11,12) Best
2001 Mar 29
1
reading big arrays from C
hello. I am trying to read a big file with different sections each with a different format, actually it is a map in format *.e00 of MapView. I can read the whole file with no problems from R using scan() but it takes too long, some files are 50 meg and have to be read line by line to catch the section codes. So if I do the reading from C would it be faster? if it is, how do I manage with the
2001 Oct 23
1
loading packages
Thanks to Roger for pointing out the packages spweights and sptests to me. I believe they will be quiet useful in my work. But... I can't get them to work! Firstly, I realised that a newer version of R is available. I have now downloaded and installed it. When I try to 'install packages from CRAN' I get: trying URL `http://cran.r-project.org/bin/windows/contrib/PACKAGES' unable
2001 Sep 10
1
data format for ppinit
After installation of R into VineLinux2.1.5, I started to enjoy statistics following some instruction, and found it very useful. One of my main purpose to use R is to try spatial statistics. Since library named "spatial" has already installed, I just tried ... > library(spatial) > towns <- ppinit(test.dat) ------- test.dat ------- x,y 4,7 5,7 5,8 5,9 6,7 6,8 6,9 7,8
2001 Jun 25
1
Linking R to GIS
Dear All, Has anyone worked with linking R to both ArcView and MapInfo GIS systems? My desire is to capture object selection from GIS and pass to R and to return spatially based statistical model results from R to GIS. If both could simultaneously access the same data file this would be a bonus. My inclination is to put together some routines based on ODBC linking but thought I would seek like
2001 May 10
3
about strsplit
Hello, I want to split a string including a "+" but it seems there is no effect because of this special character. Just to explain, I convert frequencies to midi notes (external program) but I don't want to keep information about quater-tone! > s <- c("Fd4+1/4") (i't a note!) > strsplit(s,"+") [[1]] [1] "F" "d" "4"