search for: xcoord

Displaying 20 results from an estimated 23 matches for "xcoord".

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 repl...
2008 Dec 15
1
Semi-random movement inside a circle
...t this right. 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...
2008 Dec 15
1
Movement within a circle
...is right. ?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...
2009 Apr 04
1
error in trmesh (alphahull package)
...ters). If I use rnorm to generate the same sample size with the same 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...
2010 Jan 07
0
setting different environments
...ot;, ypos(x), "\n") } ##################################################### ## 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(obj...
2009 Oct 28
2
Re ading and Creating Shape Files
...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 ,4229596 ,4229082) Lot<-c(1900 , 2000, 2100 , 100 ,200 , 300, 400 , 500 , 600 , 701 , 900 , 1000 , 1100, 300 ,100, 200) XYcoord<-spCbind(Ycoord...
2011 Aug 15
3
Plot from function
*I have the following function:* /plot_mi_time = function(mdata, miname) { mdata2 = mdata[row.names(hakat) == miname, ] print(mdata2) xcoords <- c(1,1,2,2,3,3,4,4,5,5,6,6) plot(c(xcoords), mdata2, xaxt="n", ylab="Expression", xlab="Time(h)", , main=miname) axis(1, at=xcoords, labels=c("a","a","b","b","c","c","d","d",&q...
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 ..., ..., ... wi...
2006 Oct 25
1
density plot text
...orm(100, mean = 5, sd = 3)) library(lattice) trellis.device(col = FALSE, theme = lattice.getOption("col.whitebg")) densityplot(~try) normtest <- shapiro.test(try) normtest pvalue <- round(normtest$p.value,5) normtext <- paste(normtest$method,"p-value =",pvalue) normtext xcoord <- max(try)*0.6 text(xcoord,0.1,normtext) # alternative plot(density(try)) text(0,0.1,normtext) -- Murray Pung Statistician, Datapharm Australia Pty Ltd 0404 273 283 [[alternative HTML version deleted]]
2011 Jun 01
2
re-write plot function for ggplot
Hi, I have the following function that i use to plot graphs. plot_mi_time = function(mdata, miname) { mdata2 = mdata[row.names(mir_test3) == miname, ] # print(mdata2) xcoords <- c(1,1,2,2,3,3) plot(xcoords, mdata2, xaxt="n", ylab="Expression", xlab="Time(h)", , main=miname) axis(1, at=xcoords, labels=c("a","a","b","b","c","c")) } I want to edit this function so that...
2001 Feb 22
1
Graphical parameters in perspective plot
...problem 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 efficie...
2012 Mar 20
3
error message
...etwd("C:\\TEMP) >dat <- read.table(cheshire_fmd.cvs",header=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....
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
2009 Mar 01
1
projecting GIS coordinates for analysis with spatstat package
...er than degrees lat/long. Does anybody know the code for projecting coordinates so that my density plot will show incidents per sq-mile? If there is a simpler way of displaying incident densities than using the spatstat package, please let me know. Thanks, Markus #create data data = data.frame(xcoord=c(-123.1231, -123.0245, -123.1042, -123.1555, -123.1243, -123.0984, -123.1050, -123.0909, -123.1292, -123.0973, -123.0987, -123.1016, -123.2355, -123.1005, -123.1130, -123.1308, -123.1281, -123.1281, -123.1275, -123.1269, -123.1595, -123.1202, -123.1756, -123.0791, -123.0791, -123.0969, -123.0969,...
2008 Oct 15
3
Removing characters and periods from character strings
...t way? pick=c("(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"))...
2007 Jan 15
0
spatial correlaton in lme and gls
...apture 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 us...
2008 Jul 25
0
Error in vector("double", length)
...er overflow in: n * n ----------------------------------------------------------------------- #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)...
2004 Jun 30
0
R crashes (PR#7037)
...i386-pc-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)] }...
2006 May 10
1
kernel smoothing of disease rates at locations
...ut the problem 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 5...
2009 Jan 28
1
Neighborhood distance calculator
...Best, Kumudan Kumudan Grubh EEB 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...