search for: ypos

Displaying 20 results from an estimated 59 matches for "ypos".

Did you mean: pos
2009 May 25
3
Interpolating variables within (RODBC library) SQL statements for MySQL
...ITION_to_ZIPCODE Database with holds records for German ZIP Code <--> Gauss-Krueger Coordinate System ) and want this to be selected and computed individually row by row as follows: library(RODBC) channel <- odbcConnect("database") pos_to_zip <- sqlQuery(channel, "select YPOS, XPOS FROM POSITION_to_ZIPCODE;") my_row <- pos_to_zip[1,] # get the first element (change with next ones afterwards) ypos <-my_row[1] # get the first y-position xpos <-my_row[2] # get the first X-Position So far, so good: SQL Select works and everybody is fine, b...
2002 Apr 10
0
FoxPro Regressions - followup from Feb
...window, and I entered (with the mouse) the window from the top, clicked in a couple different spots, and exited through the top. 001E0216 S WM_SETCURSOR hwnd:001E0216 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE 001E0216 R WM_SETCURSOR fHaltProcessing:False 001E0216 P WM_MOUSEMOVE fwKeys:0000 xPos:64 yPos:9 001E0216 S WM_NCHITTEST xPos:427 yPos:369 001E0216 R WM_NCHITTEST nHittest:HTCLIENT 001E0216 S WM_NCHITTEST xPos:427 yPos:369 001E0216 R WM_NCHITTEST nHittest:HTCLIENT 001E0216 S WM_NCHITTEST xPos:428 yPos:369 001E0216 R WM_NCHITTEST nHittest:HTCLIENT 001E0216 S WM_SETCURSOR hwnd:001E0216 nHittes...
2011 Jan 01
3
Plot symbols: How to plot (and save) a graphic symbols originating from a table
Dear all, Please, I have a doubt regarding symbol plotting with data originating from a table. Please, see below: I have a tab delimited file called table1.txt with 4 columns: ypos animal var1 var2 5 cat gina <= lady gina \u2264 lady 7 dog bill >= tony bill \u2265 tony 9 fish dude <= bro dude \u2264 bro #I then load in the data to R: table1<-read.table("table1.txt", header=TRUE, sep="\t") #if I take a look at the table I realize that \u226...
2010 Dec 02
4
2D Random walk
...ndom walk in 2 dimensions on a lattice. Basically I want to add something in to make it plot it point by point so you can see what is going on. Heres my code for the random walk in 2d RW2D<-function(N) { i<-0 xdir<-0 ydir<-0 xpos<-vector() xpos[1]<-xdir ypos<-vector() ypos[1]<-ydir for (i in 1:N-1) { r<-runif(1) if(r<=0.25) {xdir<-xdir+1} if(r>0.25 && r<=0.5) {xdir<-xdir-1} if(r>0.5 && r<=0.75) {ydir<-ydir +1} if(r>0.75) {ydir<-ydir-1} xpos[i+1]<-xdir ypos[i+1]&l...
2012 Oct 23
4
Changing radii line type in radial plots
Hello all, Is it possible to change the radii line type in radial plots? I wasn't able to find anything online. Thanks, Bern -- View this message in context: http://r.789695.n4.nabble.com/Changing-radii-line-type-in-radial-plots-tp4647238.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 09
1
Converting nested "for" loops to an "apply" function(s)
...;apply" function(s). The relevant code is: distances=c(51,65,175,196,197,125,10,56) #distances of 8 houses from the town centre in m bearings=c(10,8,210,25,74,128,235,335) #bearings of the houses in degrees xpos=distances*sin(bearings*pi/180) #in sin and cos the argument MUST be in radians ypos=distances*cos(bearings*pi/180) numpoints=length(distances) nnd=rep(sqrt(2*400*400),times=numpoints) #start with the maximum possible distance for (i in 1:numpoints) { for (j in 1:numpoints) { if (i!=j) { diffx=abs(xpos[i]-xpos[j]) diffy=abs(ypos[i]-ypos[j]) nd=sqrt((diffx^2)+(diff...
2009 Mar 24
1
segfault when running heatmap()
...atmap(). The sessionInfo() follows. Browse[1]> debug: op <- par(no.readonly = TRUE) Browse[1]> *** caught segfault *** address 0x103c93d53, cause 'memory not mapped' Traceback: 1: function (display = "", width, height, pointsize, gamma, bg, canvas, fonts, xpos, ypos, title, type, antialias) { if (display == "" && .Platform$GUI == "AQUA" && is.na(Sys.getenv("DISPLAY", NA))) Sys.setenv(DISPLAY = ":0") new <- list() if (!missing(display)) new$display <- display if (!missing(width)...
1998 Nov 28
1
No subject
...s). Niels > Quincunx.prg function(trials = 100) { graphsheet(pages = "Off") par(mfrow = c(1, 2)) xpoints <- seq(1, 25, 1) ypoints <- seq(1, 25, 1) xheights <- rep(0, 25) mcol <- 2 xy <- expand.grid(xpoints, ypoints) xx <- seq(1, 25, 2) yy <- rep(0, 25) ypos <- ypoints + 0.4 HT <- c("H", "T") for(j in 1:trials) { plot(xpoints, ypoints, type = "n", xlab = "", ylab = "", axes = F, main = "Galton's Quincunx") points(x = xy[, 1], y = xy[, 2], pch = 5, col = 1) marble.path <- s...
2002 Aug 23
1
Legends and Fonts
Hello. Is it possible to set specify the font used by legend()? I would like to specify a fixed-width font so that I can line up parts of vertically stacked curve labels. For example, it would be nice if I could align the names, ages, and weights in the following three curve labels: Bob age=7 weight=100 Alexander age=13 weight=150 Susan age=20 weight=130 Is there perhaps a clever
2013 Feb 14
12
[PATCH v7 0/5] xen: ARM HDLCD video driver
Hi all, these are the remaining unapplied patches of the ARM HDLCD patch series. Changes in v7: - rebased on b61ed421d2c85b5b106c63f2c14f8aa162b282f0; - turn more printk and panic into early_printk and early_panic. Changes in v6: - rebased on 77d3a1db3196b1b5864469f8d3f41d496800c795; - remove useless initializations to NULL in lfb_init; - more compact checks in lfb_init. Changes in v5: - move
2002 Mar 14
1
gif, jpeg and png image files reader AND tcltk image
Hi all, Roger Peng and Jason Turner's suggestion with ImageMagick seem to be the simplest "dirty" way to get the problem solved. But I ran into yet another interesting but quite round-about way to solve the problem (partially). Through tcltk package, one can read in the gif image with > x <- tkcmd("image", "create", "photo", file=mypic.gif)
2006 Jan 10
2
lmer(): nested and non-nested factors in logistic regression
...[age.edu.id] + a.state[state.id] y <- rnorm (n, y.hat, 1) print (cbind (age.id, edu.id, age.edu.id, state.id, y.hat, y)) # this model (and simpler versions) work fine: fit.1 <- lmer (y ~ 1 + (1 | age.id) + (1 | edu.id) + (1 | age.edu.id) + (1 | state.id)) # now go to logistic regression ypos <- ifelse (y > mean(y), 1, 0) # these work fine: fit.2 <- lmer (ypos ~ 1 + (1 | age.id) + (1 | edu.id) + (1 | age.edu.id), family=binomial(link="logit")) fit.3 <- lmer (ypos ~ 1 + (1 | age.id) + (1 | edu.id) + (1 | state.id), family=binomial(link="logit")) # thi...
2018 May 08
1
Proposed speedup of ifelse
...} else test <- if (isS4(test)) methods::as(test, "logical") else as.logical(test) ## this is to ensure the documented behavior re: attributes of result ans <- test len = length(ans) if(nonas <- !anyNA(test)) { ypos = test npos = !test } else { ok <- !(nas <- is.na(test)) ypos = test & ok npos = !test & ok } if(any(ypos, na.rm = TRUE)) ##equivalent to any(test[ok]) ans[ypos] = rep(yes, length.out = len)[ypos] if(any(npos, na.rm = TRUE)) ##eq...
2001 Nov 20
2
quiver plot help
...ave a matrix of x-components of velocity and a matrix of y-components and I want to see the overall flow pattern. (I work with 2D fluid mechanics problems). My first-stab function is below: quiver <- function(u,v,scale=1) # first stab at matlab's quiver in R { xpos <- col(u) ypos <- max(row(u))-row(u) speed <- sqrt(u*u+v*v) maxspeed <- max(speed) u <- u*scale/maxspeed v <- v*scale/maxspeed matplot(xpos,ypos,type="p",cex=0) arrows(xpos,ypos,xpos+u,ypos+v,length=0.05) } Thus, for example u <- matrix(rnorm(100),nrow=1...
2003 Aug 15
0
Re: [R} stars graphs
...1*max(lengths) if(missing(radial.range)) radial.range<-range(radial.pos) plot(c(-maxlength,maxlength),c(-maxlength,maxlength),type="n",axes=FALSE, main=main,xlab=xlab,ylab=ylab,...) # get the vector of x positions xpos<-cos(radial.pos)*lengths # get the vector of y positions ypos<-sin(radial.pos)*lengths segments(0,0,xpos,ypos) if(missing(labels)) labels<-as.character(radial.pos) if(missing(label.pos)) { xpos<-cos(radial.pos)*maxlength ypos<-sin(radial.pos)*maxlength } else { xpos<-cos(label.pos)*maxlength ypos<-sin(label.pos)*maxlength } te...
2003 Aug 13
1
stars graphs
Hi listers, A few days ago I posted a question about the use of the stars function on selected lines of a frame. Thanks to two helpers, a closer look at the scale argument allowed to partially solve the problem. Yet I still have a problem with stars. Allow me to explain what I intend to do (sorry for my poor English and the long post): I want to graph an activity index of a fish during the day
2005 Jun 14
0
Plotting quiver vector tensor arrows 2d field data
...the archives. Is this the best solution or are there other tools I missed? quiver<- function(u,v,scale=1,length=0.05) # first stab at matlab's quiver in R # from http://tolstoy.newcastle.edu.au/R/help/01c/2711.html # Robin Hankin Tue 20 Nov 2001 - 13:10:28 EST { xpos <- col(u) ypos <- max(row(u))-row(u) speed <- sqrt(u*u+v*v) maxspeed <- max(speed) u <- u*scale/maxspeed v <- v*scale/maxspeed matplot(xpos,ypos,type="p",cex=0) arrows(xpos,ypos,xpos+u,ypos+v,length=length*min(par.uin())) } par.uin <- function() # determ...
2010 Jan 07
0
setting different environments
...classes together in one script. While running this script I create a lot of new functions and objects An example for S3 and S4 classes: ## S3 classes pt <- list(x=1,y=2) class(pt) <- "xypoint" xpos <- function(x, ...) UseMethod("xpos") xpos.xypoint <- function(x) x$x ypos <- function(x, ...) UseMethod("ypos") ypos.xypoint <- function(x) x$y print.xypoint <- function(x) { cat("xypoint\n") cat("x: ", xpos(x), " y: ", ypos(x), "\n") } ##################################################### ## S4 classes setC...
2009 Aug 18
3
how to draw pentagon?
Hi everyone, I want you all help me to give an idea, how to draw pentagon with points? Maybe can use function, but I'm stuck. Yhank you. -- Hemavathi Ramulu [[alternative HTML version deleted]]
2009 Mar 05
3
text at the upper left corner outside of the plot region
Hi, is there a way to place text at the upper left corner (or another corner) of the plot? I want to place it really at the upper left corner of the whole plot (the file I get), not at the upper left corner of the plot-region. I tried text() and mtext(), and corner.label() of the plotrix package but it didn't work out. thanks!