search for: coord

Displaying 20 results from an estimated 645 matches for "coord".

Did you mean: coords
2009 Feb 16
1
Help with rgl
...ser to the observer, and then the object rotates and the B vortex gets closer. I would like to capture this movie to a file. By the way, I am not being able to insert unicode text with text3d. rgl 0.82, R 2.8.1, Windows Vista. Any help would be appreciated. Code follows: library(rgl) open3d() coord.1=c(0,100,0) coord.2=c(100,100,0) coord.3=c(100,0,0) coord.4=c(0,0,0) coord.5=c(50,50,70) pyrcolor="red" triangles3d(rbind(coord.1,coord.4,coord.5),color=pyrcolor) triangles3d(rbind(coord.1,coord.2,coord.5),color=pyrcolor) triangles3d(rbind(coord.2,coord.3,coord.5),color=pyrcolor) triang...
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
...ab.y <- paste("Dim ", axes[2], " (", signif(res.mfa$eig[axes[2], 2], 4), " %)", sep = "") group <- res.mfa$call$group nbre.grpe <- length(group) type <- res.mfa$call$type num.group.sup = NULL if (!is.null(res.mfa$group$coord.sup)) { num.group.sup <- res.mfa$call$num.group.sup nbre.grpe.sup <- length(num.group.sup) type.sup <- res.mfa$call$type[num.group.sup] type.act <- type[-num.group.sup] nbre.grpe <- nbre.grpe - length(num.group.sup) } if (choix == &quot...
2003 Apr 28
2
sum(..., na.rm=TRUE) oddity
...I've had no luck searching the mail archives, so I was hoping somebody could explain/check this one for me. I will need to apply the function to missing data, simple as it is. Code: x<-matrix(runif(20,0,5)%/%1,4,5) # random matrix data set 4x5, values are integers between 0 and 4 coords<-c(2,3,3,4) # choose any sub-matrix, with c(ymin,ymax,xmin,xmax) being row and column indices. occupied.counter<-function(coords){sum(x[coords[3]:coords[4],coords[1]:coords[2]])} occupied.counter(coords) [1] 7 occupied.counter<-function(coords){sum(x[coords[3]:coords[4],coords[...
2005 Dec 19
1
How to draw partial grid in plot for spatial-binomial experiment?
...lly appear in the middle of the square cell. I know there is the 'grid' package but it seems the plots made using 'graphics' are not compatible with the plots made using 'grid' (as warned in the grid help pages). Thanks in advance. Ruben "fri"<-structure(list( coords=structure(c(606,606,608,608,608,608,608,610,610,610,610,610,610,610,612,612,612,612,612,612,614,614, 614,614,614,614,614,614,614,616,616,616,616,616,616,616,618,618,618,618,618,620,620,620,622,624, 4388,4390,4384,4386,4388,4390,4392,4380,4382,4384,4386,4388,4390,4392,4380,4382,4384,4386,4388,4390,...
2007 Apr 03
1
which points within an ellipsoid? Sorting data in 3d
Hello, in a three dimensional coordinate system, I'd like to find all my experimental data points that fall within an ellipsoid around a fixed coordinate. The fixed point is defined by (x.coord.point, y.coord.point, z.coord.point). The coordinates of the ellipsoid are given by the three vectors x,y,z. In a previous version o...
2009 Mar 10
1
North Arrow (.png file) on a Map
...) and addlogo() functions. Well I can import the png with pixmap() function (I guess, once there’s no error message), but I can’t put It on the map, I got an error message telling me that: “Error at t(x@index[nrow(x@index):1, , drop = FALSE]) : index out of limits” Well I tried changing coordinates but I always got the same result. How do I do this correctly? Is there a better way? Thanks for the help and attention. Here is the complete map script: library(RODBC) library(maps) library(mapdata) library(maptools) library(pixmap) #Carregar Coordenadas e dados dos Pontos Am...
2006 Apr 13
2
a question on subset a dataset
Dear R-users, I generate a dataset "d", and want to get a subset from it. ** *z<-rnorm(9) coords<-cbind(x=c(1,1,1,2,2,2,3,3,3),y=c(1,2,3,1,2,3,1,2,3)) d<-SpatialPointsDataFrame(coords, data.frame (z=z[1:9]))* The result*/dataset* is coordinates z 1 (1, 1) 1.41173570 2 (1, 2) 0.18546503 3 (1, 3) -0.04369144 4 (2, 1) -0.21591338 5 (2, 2) 1.46377535...
2013 Jan 29
1
points rejected as lying outside the specified window
...than what would be expected due to chance, if individuals of variable_type=0 are spatially distributed more than what would be expected due to chance, and finally if the spatial distribution of variable_type=1 differs from that of variable_type=0. x<-NYBorough at polygons[[1]]@Polygons # ppp(x.coordinates, y.coordinates, x.range, y.range) coords<-slot(x[[1]],"coords") coords coords<-coords[19:1,] coords<-coords[-1,] coords u<-myfile$type==0 Type_0<-ppp(myfile$X[u],myfile$Y[u], window=owin(poly=list(x=coords[,1],y=coords[,2]))) Type_1<-ppp(myfile$X[...
2012 Jun 04
1
Plotting with Rgraphviz
...cted edges Number of Nodes = 6 Number of Edges = 9 > plot(am.graph, attrs = list(node = list(fillcolor = "lightblue"), + edge = list(arrowsize=0.5))) There were 18 warnings (use warnings() to see them) > warnings() Warning messages: 1: In plot.xy(xy.coords(x, y), type = type, ...) : "len" is not a graphical parameter 2: In plot.xy(xy.coords(x, y), type = type, ...) : "edgemode" is not a graphical parameter 3: In plot.xy(xy.coords(x, y), type = type, ...) : "len" is not a graphical parameter 4: In plot.xy(xy.coords...
2006 Jan 21
1
Bug in xy.coords() or documentation error?
Hi, I noticed the following problem with xy.coords() in R 2.2.1-patched (version info at the foot of this email) and R 2.3.0 unstable (subversion no: r37123): > xy.coords(x = matrix(1:20, ncol = 2)) Error in xy.coords(x = matrix(1:20, ncol = 2)) : argument "y" is missing, with no default > xy.coords(x = matrix(1:20, ncol =...
2007 Dec 12
2
problem applying a conditional formula to each element of a matrix
...In if (h <= phi) { : the condition has length > 1 and only the first element will be used # function Cov.f <- function(h, sigmasq, phi) { if (h <= phi) {Cij <- sigmasq * (1 - ( 1.5 * (h/phi) - 0.5 * (h/phi)^3)) } else if (h > phi) {Cij <- 0} return(Cij) } x.coord <- c(5.7, 6.7, 9.8) y.coord <- c(42.7, 10.2, 77.4) coords <- cbind(x.coord, y.coord) distance.matrix <- as.matrix(dist(coords, method="euclidean")) distance.matrix Cov.f(distance.matrix, 3.9, 58.1)
2011 Jan 20
1
Generating time progressing line for Google Earth
Dear, I am trying to visualise a time-progressing line (it's supposed to represent spread patterns) using brew package and Google Earth. The idea is to have a function which takes start and end point geographic coordinates, as well as number of intervals to chop the path up, and returns the collection of points segmenting this line. Unfortunately my calculations fail for large distances, as the generated lines are nowhere near being straigth (run the code to see the example). My R code so far: ###########...
2007 Oct 02
0
[ wxruby-Patches-14375 ] bigdemo/wxScrolledWindow - paint bug with scrolled window
...this to save the current absolute... @event_y_old = event.get_y # ... mouse position @curLine = [] capture_mouse() @drawing = true end end ---- And in on_left_button_event_motion From: paint do | dc | dc.set_pen(Wx::Pen.new("MEDIUM FOREST GREEN", 4, Wx::SOLID)) coords = [@x, @y] + convert_event_coords(event) @curLine.push(coords) coords.flatten!() dc.draw_line(coords[0], coords[1], coords[2], coords[3]) set_XY(event) end To: paint do | dc | dc.set_pen(Wx::Pen.new("MEDIUM FOREST GREEN", 4, Wx::SOLID)) save_coords = [@x, @y] + convert_event...
2013 Apr 26
1
[newbie] how to find and combine geographic maps with particular features?
...extents, # raster::extent object > LCC.parallels=c(33,45), # LCC standard parallels: see https://github.com/TomRoche/cornbeltN2O/wiki/AQMEII-North-American-domain#wiki-EPA > CRS # see `sp::CRS` > ) { > library(M3) > ## Will replace raw LCC map's coordinates with: > metadata.coords.IOAPI.list <- M3::get.grid.info.M3(extents.fp) > metadata.coords.IOAPI.x.orig <- metadata.coords.IOAPI.list$x.orig > metadata.coords.IOAPI.y.orig <- metadata.coords.IOAPI.list$y.orig > metadata.coords.IOAPI.x.cell.width <- metadata.coord...
2011 Dec 21
1
Gps fraction of degrees function
Dear all,   I have the following written example > coords <- "51°30'48.58\"N" > > as.integer(strsplit(coords, "°")[[1]][1]) [1] 51 > as.integer(strsplit(strsplit(coords, "°")[[1]][2], "'")[[1]][1]) [1] 30 > as.numeric(strsplit(strsplit(strsplit(coords, "°")[[1]][2], "'...
2000 Nov 20
1
Bug in stars.R (PR#739)
...ar(no.readonly = TRUE) on.exit(par(opar)) plot(0, type = "n", ..., xlim = temp.xlim, ylim = temp.ylim, xlab = "", ylab = "", asp = 1, axes = draw.axes) if (draw.segments) { for (i in 1:n.loc) { poly.x <- NA poly.y <- NA start.x.coord <- x[i, ] * cos(angles) + loc[i, 1] start.y.coord <- x[i, ] * sin(angles) + loc[i, 2] for (j in 1:n.seg) { poly.x <- c(poly.x, loc[i, 1], start.x.coord[j]) poly.y <- c(poly.y, loc[i, 2], start.y.coord[j]) next.angle <- if (j < n.seg)...
2001 May 04
1
scoping error in xy.coords (PR#932)
Hola! > rm(list=ls(all=TRUE)) > x <- 1:20 > y <- 1+x+rnorm(x) > xy.coords(y ~ x,NULL) ... expected output, correct, but when called from inside lowess: > lowess(y ~ x) Error in xy.coords(x, y) : x and y lengths differ > debug(xy.coords) > lowess(y ~ x) debugging in: xy.coords(x, y) ... long listing deleted if (is.language(x)) { if (inherits...
2011 Feb 21
2
(no subject)
...ambda*area) > u = runif(N,-2,4) > v = runif(N,0,4) > plot(u,v,asp=1) > h = chull(u,v) > h = c(h,h[1]) > plot(u[h],v[h],"1",asp=1) Error in plot.xy(xy, type, ...) : invalid plot type '1' > plot(u[h],v[h],"l",asp=1) > points(u,v) Error in plot.xy(xy.coords(x, y), type = type, ...) : plot.new has not been called yet > pts=as.points(u,v) > pointmap(pts) > hullpoly=as.points(u[h],v[h]) > polymap(hullpolly,add=TRUE) Error in xy.coords(x, y) : object 'hullpolly' not found > help(polymap) > help(plot.net) No documentation for &...
2013 Apr 14
2
script works in Rgui, but failes in Rscript (coords, package 'pROC')
...1, 1.874567e-02, 5.127498e-01, 9.438651e-03, 2.162788e-01, 9.142649e-04, 1.173577e-01, 7.270350e-03, 4.699286e-01, 4.553215e-03, 3.942892e-01) roc_test <- data.frame (hits, score) roc1 <- roc(roc_test$hit, roc_test$score, plot = FALSE, smooth = FALSE, sensitivities = TRUE ) roc.result <- coords(roc1, "best", ret=c("t", "se", "sp"), as.list = TRUE, best.method=c("closest.topleft")) print(roc.result$best$threshold) # script ends here. However, executing in the command line (C:\Progra~1\R\R-2.15.3\bin\Rscript.exe ROC_test.R) gives followin...
2007 Oct 26
1
Help needed on calculation of Moran's I
Hi, I am trying to calculate Moran's I test for the residuals for a regression equation, but I have trouble converting my coordinates into nb format. I have used the dnearneigh() funtion now with an arbitrarily high upper distance to make it include all plots. However, when I do the lm.morantest() I get a Moran's I value which is the same as the expected value and a P-value of 1. I have used the following code: >at...