similar to: nested for() loops for returning a nearest point

Displaying 20 results from an estimated 4000 matches similar to: "nested for() loops for returning a nearest point"

2003 Nov 06
1
for help about R--probit
Not real data. It was gererated randomly. The original codes are the following: par(mfrow=c(2,1)) n <- 500 ######################### #DATA GENERATING PROCESS# ######################### x1 <- rnorm(n,0,1) x2 <- rchisq(n,df=3,ncp=0)-3 sigma <- 1 u1 <- rnorm(n,0,sigma) ylatent1 <-x1+x2+u1 y1 <- (ylatent1 >=0) # create the binary indicator ####################### #THE
2003 Aug 01
1
behavior of weights in nnet's multinom()
I see that "case weights" can be optioned in multinom(). I wanted to make sure I understand what weights= is expecting. My weights (not really mine but I'm stuck with them) are noninteger, are not scaled to sum to the sample size, and larger weights are intended to increase influence. The description of various types of weights is a perennial confusion for me; sorry. STS
2016 Apr 04
2
multiple bar plot annotation text labelling
Readers, The attempt is to create a bar plot with text labels adjacent to each datum value. Data file: 1,3,A 1,8,B 1,1,C 1,9,D 2,5,C 2,4,E 2,2,F 2,0,G testbarplot<-read.csv('data1.csv', header=FALSE) barplot(axes=FALSE, ann=FALSE, horiz=TRUE, testbarplot[,2], ylab= 'group', xlab= '(x values)', space=c(1,0,0,0, 1,0,0,0)) text(testbarplot[,2], testbarplot[,1],
2016 Apr 04
0
multiple bar plot annotation text labelling
Use only plain text emails. Don't attach file types that will be stripped. See the footer at the bottom of your email for more information. Do give us the data using dput(): > dput(testbarplot) structure(list(V1 = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L), V2 = c(3L, 8L, 1L, 9L, 5L, 4L, 2L, 0L), V3 = structure(c(1L, 2L, 3L, 4L, 3L, 5L, 6L, 7L), .Label = c("A", "B",
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
2004 Apr 16
1
Spatial Voter Model
Has anyone coded (in R) a spatial voter model with mutation (e.g., Kimura and Weiss 1964, Holley and Liggett 1975, Durrett and Levin 1996)? In principle, it is quite straightforward, but useful simulations require many many iterations, making my "straightforward" version too time intensive. I am happy to share my version (without mutation, below), for what it is worth. Thank you in
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
2003 Nov 05
1
fast nearest-neighbor in R?
Is fast nearest-neighbor functionality available in R? I was thinking of something along the lines of what's currently in S+SPATIALSTATS. Thanks for any information anyone might have on this. - MZ
2006 Apr 04
1
imaging and contouring
Dear R'Helpers and Colleagues, I have looked in the documentation, asked to some colleagues in the lab, but was unable to solve the following difficulty. I am running R on a iMac G5 with OS 10.4. The file below (73 rows x 144 col) shows the values of a climatic index on the globe with a grid of 2,5 ? x 2,5 ? (NA = no value): ? With image() and map() and running the following
2018 May 20
1
How to average values from grid cells with coordinates
Hi lily, It's not too hard to do it using dataframes. Getting the indexing right is usually that hardest part: # these values are the centers of the black cells lat<-rep(28:38,11) lon<-rep(98:108,each=11) pop<-sample(80:200,121) # just use the data.frame function blackcells<-data.frame(lat=lat,lon=lon,pop=pop) plot(0,type="n",xlim=c(97.5,108.5),ylim=c(27.5,38.5),
2007 Oct 03
2
Speeding up simulation of mean nearest neighbor distances
I've written the function below to simulate the mean 1st through nth nearest neighbor distances for a random spatial pattern using the functions nndist() and runifpoint() from spatsat. It works, but runs relatively slowly - would appreciate suggestions on how to speed up this function. Thanks. --Dale library(spatstat) sim.nth.mdist <- function(nth,nsim) { D <- matrix(ncol=nth,
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 of Biostatistics office: not yet
2011 Apr 11
4
nndist R vs. ArcGIS
Can anyone tell me why I would get different average nearest neighbor values for the same set of coordinates between ArcGIS 10 and R? Sometimes the difference in distance is over 1.3 km. Alexis -- View this message in context: http://r.789695.n4.nabble.com/nndist-R-vs-ArcGIS-tp3442375p3442375.html Sent from the R help mailing list archive at Nabble.com.
2012 Nov 18
2
[lattice] format and rotation of strip text
Thanks to the lattice gurus on this list, and having reference to the excellent open-access Sarkar 2008 ISBN 978-0-387-75968-5 e-ISBN 978-0-387-75969-2 http://dx.doi.org/10.1007/978-0-387-75969-2 I now know how to label lattice panels by variable value: see thread starting @ https://stat.ethz.ch/pipermail/r-help/2012-November/329450.html (and demonstrated below). This allows me to use
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 context:
2018 May 22
0
How to average values from grid cells with coordinates
Hi Jim, Thanks. It works. I now have more complex problems. If at each blackcell, there are two variables such as pop and mood. For each variable, there are daily records in one year, so 365 records for pop and 365 records for mood. The averaged values for the redcells should be daily records too. What kind of format do you recommend for this problem? Right now, I just get the latitudes and
2011 Aug 04
3
persp()
Hello I am trying to draw a basic black and white map of two European countries. After searching some key words in google and reading many pages I arrived to the conclusion that persp() could be used to draw that map. I have prepared three small example files, which are supposed to be the files required for running that function. xvector is a vector with the longitudes yvector is a vector with
2013 Apr 10
1
problem with the image command
Hello R-users, I am trying to do an image plot where I have been given latitudes, longitudes and the values at the corresponding locations. A sample of the data is given as follows: values=c(0,1,0,0,0,0,2,2,0,0) lat=c(29.6660,29.6756,29.3492,29.2654,29.2827,29.4070,35.3510,35.6590,35.7587,38.2794)
2012 Jul 04
3
Please help
Dear All, I am a research student in environment. I have only little programming knowledge. I am currently doing the last project about rainfall impact on ground water quality in an area. It happens that I have to use R to read rainfall data (3 dimension) from ASC file (*.asc), and then write them into one NCDF file (*.nc). I have been working very hard on study R, but I
2003 Jan 30
2
nearest neighbour interpolation
Dear Help List, My name is Matt Oliver. I have been using R for about a year and find it very helpful. However, I have a need for a function that I cannot find. I am 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