search for: ycoord

Displaying 20 results from an estimated 22 matches for "ycoord".

Did you mean: coord
2005 Nov 11
3
problems with for: warnings and segfault
Hi, I have two problem with a for looping using R Version 2.1.1 (2005-06-20) on a Debian Linux Testing. The first problem: warnings messages Look: > xcoord <- 5 > ycoord <- 5 > indice <- 1 > for(i in c(1:5)) {indice <- indice+1;xcoord[indice] <- xcoord+i; ycoord[indice] <- ycoord } Warning messages: 1: number of items to replace is not a multiple of replacement length 2: number of items to replace is not a multiple of replacement length 3: n...
2008 Dec 15
1
Semi-random movement inside a circle
...ght. Would somebody kindly give me a hint ? This is my code so far, the particle starts at some point and moves towards the wall, but I don't get the "bouncing off" part right . Any help would be much appreciated. Juliane days=10 circularspace=data.frame(day=c(0:days),xcoord=1,ycoord=1,xvelocity=1,yvelocity=1,xdistwall=0, ydistwall=0, wallxvel=0, wallyvel=0,stochasticxvel=0,stochasticyvel=0) xmax=10 xmin=-10 ymax=10 ymin=-10 mindist=8 plot(xmin:xmax, ymin:ymax, type = "n") circularspace radius=10 timesteplength=1 weightfactor=1 for(i in 1:days) { #This is the stochast...
2008 Dec 15
1
Movement within a circle
...?Would somebody?be able to?give me a hint ? This is my code so far, the particle starts at some point and moves towards the wall, but I don't get the "bouncing off" part right?. ? Any help would be much appreciated. ? Juliane ? days=10 circularspace=data.frame(day=c(0:days),xcoord=1,ycoord=1,xvelocity=1,yvelocity=1,xdistwall=0, ydistwall=0, wallxvel=0, wallyvel=0,stochasticxvel=0,stochasticyvel=0) xmax=10 xmin=-10 ymax=10 ymin=-10 mindist=8 plot(xmin:xmax, ymin:ymax, type = "n") circularspace radius=10 timesteplength=1 weightfactor=1 for(i in 1:days) { #This is the stochast...
2010 Jan 07
0
setting different environments
...## S4 classes setClass("point", representation(x="numeric", y="numeric")) ## Objekt new("point", x=3, y=4) # new("point", x=17, y=5) ## Generics setGeneric("xcoord", function(object) standardGeneric("xcoord")) setGeneric("ycoord", function(object) standardGeneric("ycoord")) setGeneric("showpoint", function(object) standardGeneric("showpoint")) setMethod("xcoord", "point", function(object) object@x) setMethod("ycoord", "point", function(object) obje...
2009 Apr 04
1
error in trmesh (alphahull package)
...me mean and SD, I can compute the alpha shape without trouble (which is why I think it might have to do with the spatial arrangement of my points). See below: # first here's a quick sample of my data (UTM coordinates) > xcoords[1:5] [1] 670080.2 670080.2 670080.2 670080.2 670080.2 > ycoords[1:5] [1] 5005501 5005499 5005498 5005497 5005495 > xcoords[1:5] #try the ashape routine with error > alpha.shape<-ashape(xcoords,ycoords,15) Error in tri.mesh(X) : error in trmesh #get statistics to generate a similar dataset to test against > length(xcoords) [1] 26257 > length...
2009 Oct 28
2
Re ading and Creating Shape Files
...shp") Bldg<-readShapeSpatial(Building,proj4string=NAD83) I know i am mis interpreting the documentation but it doesnt seem like it is very complicated so i am of course confused. Also, i am wondering if i can create a shape file by simply using XY coordinates from a data frame. So for: Ycoord=c( 865296.4, 865151.5, 865457.0 ,865363.4 ,865311.0, 865260.9 ,865210.7 ,865173.3, 865123.6 ,865038.2 ,864841.1 ,864745.4 ,864429.1 ,864795.6 ,864334.9 ,864882.0) Xcoord=c( 4227640 ,4227816 ,4228929 ,4228508 ,4229569 ,4229498 ,4226747, 4226781, 4229597, 4229204, 4228910, 4228959 ,4229465 ,4229794...
2006 Sep 07
2
merging tables by columns AND rows
Hi everyone! I have 100 tables of the form: XCOORD,YCOORD,OBSERVATION 27.47500,42.52641,177 27.48788,42.52641,177 27.50075,42.52641,179 27.51362,42.52641,178 27.52650,42.52641,180 27.53937,42.52641,178 27.55225,42.52641,181 27.56512,42.52641,177 27.57800,42.52641,181 27.59087,42.52641,181 27.60375,42.52641,180 27.61662,42.52641,181 ..., ..., ... with appr...
2001 Feb 22
1
Graphical parameters in perspective plot
...m for setting graphical parameters in perspective plot (function persp). I wonder if it's possible to add some text (function text) on an existing persp plot USING the axis coordinates. In fact I want to add some text on a persp plot according to x coordinates. I've tried to use text(xcoord,ycoord, label="toto") but the toto text doesn't appear at (xcoord, ycoord) following the xy axis. Maybe function text is not accurate for 3D plots ? By the way, is it possible to modify the ticks length (separately for each axis) since the arguments tcl and tck seem to be non efficient, and...
2012 Mar 20
3
error message
...er=TRUE, sep=",") > dat.<-read.table(''chesire_fmd.cvs'',header=TRUE,sep='',) Error: unexpected symbol in "dat.<-read.table(''chesire_fmd.cvs" > dat$x.km <-dat$xcoord/1000 Error: object 'dat' not found > dat$y.km <-dat$ycoord/1000 Error: object 'dat' not found > dat[1:10,] Error: object 'dat' not found > Library(splancs) I was advised to remove the '>' at begining of each line, but its like that symbol is a default. How do i do that. Thanks El-Oji Adamu Nigeria [[alternative HTML versi...
2009 Mar 01
1
projecting GIS coordinates for analysis with spatstat package
..., -123.0791, -123.0791, -123.0969, -123.0969, -123.0905, -123.0718, -123.0969, -123.1337, -123.1531, -123.1362, -123.1550, -123.0725, -123.1249, -123.1249, -123.1249, -123.1249, -123.1249, -123.1777, -123.1237, -123.1912, -123.0256, -123.1347, -123.1246, -123.1931, -123.0971, -123.0281, -123.0928), ycoord=c(49.27919, 49.23780, 49.24881, 49.27259, 49.26057, 49.25654, 49.25000, 49.28119, 49.27908, 49.28442, 49.28318, 49.27293, 49.25805, 49.28137, 49.22528, 49.26066, 49.27841, 49.27841, 49.28019, 49.27414, 49.24220, 49.27744, 49.23474, 49.28229, 49.28229, 49.27671, 49.27671, 49.25974, 49.26510, 49.2767...
2008 Oct 15
3
Removing characters and periods from character strings
...;(Intercept)", "Clear", "factor(Hab)3", "factor(Hab)4", "factor(Hab)5","factor(Hab)7", "factor(Log)1", "Hunt", "Pop", "s(PrimRd).1", "s(PrimRd).2", "Unlog", "Xcoord", "Ycoord") vars=as.character(as.vector(strsplit(pick,"1"))) vars=unique(as.character(as.vector(strsplit(vars,"2")))) vars=unique(as.character(as.vector(strsplit(vars,"3")))) vars=unique(as.character(as.vector(strsplit(vars,"4")))) vars=unique(a...
2002 Jun 19
4
drawing ellipses
Hello again, First I want to thank all the people who answered my question about line width in graphs. I promise I will learn the 'par' help page by heart for the end of the month ! I now want to trace some ellipses to emphasize groups of data. I found how to trace circles with 'symbols()', but no ellipse. I'm planning on writing my own function based on
2007 Jan 15
0
spatial correlaton in lme and gls
...the correlation within stations. My question is.....I have x and y coordinates for each station (the subsamples have nearly the same coordinates)...how do you include a spatial correlation structure between stations? I tried things like: tmp<-gls(y~z,correlation=corSpher(form=~xcoord+ycoord| Station)) but this is modelling the within-station correlation. I want to include between station correlation as some stations are close in space, and others are not. Station is the highest level (it is just 2-way data). Is this possible? The examples in the literature mainly use xcoor...
2008 Jul 25
0
Error in vector("double", length)
...-------------------------------------------------------------- #Code: library(geoR)#for variograms and kriging library(akima)#for interp library(fields)#for plot.surface library(spatstat) library(spdep) #transform coordinates in kilometers, and redefine origin newx=(xcoord-min(xcoord))/1000 newy=(ycoord-min(ycoord))/1000 plot(newx,newy,pch=20,xlab="X coordinate (km)",ylab="Y coordinate (km)") #set of new locations to be used from here on tr.locs=cbind(newx,newy) #transform proportions using an angular transformation rel.tr=asin(sqrt(rel_dom/100)) #set as geodata rd<-as.ge...
2004 Jun 30
0
R crashes (PR#7037)
...mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 9.1 year 2004 month 06 day 21 language R start code----- ts.cor<- function(Variable, Xcoord, Ycoord, Year){ ts<- tapply(Variable, list(Year, paste(Xcoord, Ycoord)), mean) for(j in 1:500) { samp<- sample(seq(ncol(ts)), replace= T) cor.ts.boot<- cor(ts[, samp], use= "p", method= "spearman") cor.ts.boot<- cor.ts.boot[lower.tri(cor.ts.boot)] } } V&lt...
2006 May 10
1
kernel smoothing of disease rates at locations
...blem is I get negative results after smoothing and I do not understand why? Your contributions will be highly appreciated or if there is any package that can do this I will be happy to know about it. Thanks in advance for your comments. Oarabile Below is how my data in R looks like Xcoord Ycoord smr 1 383894.70 653202.8 1.5816327 2 339053.00 631770.9 1.0003473 3 369164.50 609973.2 1.2943872 4 313477.70 640382.8 0.9443508 5 290748.80 695088.8 1.1662125 6 287547.50 679829.6 0.9433962 7 259031.90 704478.3 1.0184905 8 329107.60 585753.3 1.0445860 9 292170.20 578978.2 1....
2009 Jan 28
1
Neighborhood distance calculator
...EB Graduate student Iowa State University ------------------------------------------------------------------------------------------------------------------------------------------------------- #--Code-- #transform coordinates in kilometers, and redefine origin newx=(XCOORD-min(XCOORD))/1000 newy=(YCOORD-min(YCOORD))/1000 plot(newx,newy,pch=20,xlab="X coordinate (km)",ylab="Y coordinate (km)") #set of new locations to be used from here on tr.locs=cbind(newx,newy) #the functions necessary for estimation are written in an external program. All you need to do is to run this progr...
2006 Jan 09
1
How to use filled.contour(x,y,z) data for levelplot(z)?
Dear all, We used the following function to create a spatial plot of a raster image: filled.contour(xx,yy,zz, color = terrain.colors, nlevels=10, main=naamjaar, plot.axes = { contour(Xcoord/1000,Ycoord/1000,lim.data, nlevels = 4, col=4,drawlabels = T, axes = FALSE, frame.plot = FFALSE, add = TRUE);axis(1); axis(2); points(fire[,2:3]/1000,col="red",pch="*",cex=2,lwd=3) }) we however would like to create 5 maps with only o...
2009 May 23
0
dimnames does not match array extent
...owever, when I use the function "structure" I get the following results: > str(coord) 'data.frame': 114 obs. of 3 variables: $ sites : Factor w/ 114 levels "beni.bl","beni.pen",..: 1 2 3 4 5 6 7 8 9 10 ... $ xcoord: num 2.16 1.35 9.01 9.72 9.83 ... $ ycoord: num 6.92 11.02 5.24 4.81 5 ... > str(comdist) Class 'dist' atomic [1:6441] 0.00 2.74e-05 5.58e-01 3.65e-01 6.03e-03 ... ..- attr(*, "Labels")= chr [1:114] "beni.bl" "beni.pen" "came.kor" "came.kup" ... ..- attr(*, "Size")...
2012 Jun 29
3
how to add the sample number in the hist figure
hi,R-users: Now I plot some data with the name(aveobsdata) in column , How can I add the some number(e,g. the sample number) in each of the column? plot(aveobsdata,type='h',lwd=line_width,col=line_col,main=titleinfo,xlab=xxlab,ylab=yylab,xaxt = "n") axis(1, at = 1:nums, label = name) --