search for: xloc

Displaying 14 results from an estimated 14 matches for "xloc".

Did you mean: loc
2010 Jan 20
1
function curve() (PR#14191)
...match = 0L) )) stop("'expr' must be a function or an expression containing 'x'") expr <- sexpr if (is.null(ylab)) ylab <- deparse(sexpr) } Example: # use curve() mycurveA <- function(x,from=1,to=10){ xloc <- parse(text=x) # call("mycurve0",expr=xloc,from=from,to=to) do.call("curve",list(expr=xloc,from=from,to=to)) } # use curve modified as suggested above. mycurveB <- function(x,from=1,to=10){ xloc <- parse(text=x) # call("mycurve0",expr=xloc,f...
2011 Feb 25
1
data.frame operations
Hi All, I've been doing circles with this all morning, although I'm sure there's a simple solution. I have a data.frame "pop" as follows: > pop ind xloc yloc gonad 1 1 5 2 12 2 1 5 4 25 3 1 3 3 30 4 1 5 4 10 5 1 1 4 08 . . . . . 10 1 1 4 11 And I need the following steps: 1. Sum "gonad" by combining (xloc, yloc) as follows and create data.frame "fish&...
2011 Mar 19
3
create a matrix with values from data.frame
Hello, I'm trying to create a matrix (95x55) with data from a data.frame pop: xloc yloc go ind Ene totW 1 23 20 516 1 0.02 20.21 2 23 20 1143 1 0.02 20.21 3 23 20 250 1 0.02 20.21 4 22 15 251 1 0.02 18.69 5 22 15 598 1 0.02 18.69 6 21 19 250 1 0.02 20.21 7 22 20 251...
2011 Feb 23
1
Fwd: Re: sum data from data.frame in a matrix
...age -------- Subject: Re: [R] sum data from data.frame in a matrix Date: Wed, 23 Feb 2011 00:10:52 -0800 From: Dennis Murphy <djmuser at gmail.com> To: Nicolas Gutierrez <nicolasg at uw.edu> Hi: ...and a second way, using the reshape2 package: library(reshape2) dcast(df, yloc ~ xloc, value_var = 'yield', fun = sum) yloc 10 11 12 1 10 0 81 0 2 11 0 0 30 3 12 95 0 0 Dennis On Tue, Feb 22, 2011 at 11:30 PM, Nicolas Gutierrez <nicolasg at uw.edu <mailto:nicolasg at uw.edu>> wrote: Hi all (again), I have a data frame "pop&quot...
2011 Feb 23
1
sum data from data.frame in a matrix
Hi all (again), I have a data frame "pop": xloc yloc yield 1 10 12 95 2 11 10 81 3 12 11 20 4 12 11 10 And I want to get the sum of yield for the cell (pop$xloc, pop$yloc) in a matrix as follows: xloc 10 11 12 10 0 81 0 yloc 11 0 0 30 12 95 0 0 Any ideas? thanks!...
2011 Feb 08
2
delete a row in dataframe w/o changing indexing
Hi All, I'm trying to delete a row from my dataframe "pop" without changing the indexing (column 0) as follows: >pop id birth size xloc yloc weight energy gonad consumed 1 1 36 13 34 43 0 18 0 0 2 2 36 10 39 38 0 18 0 0 3 3 36 10 37 35 0 18 0 0 4 4 36 10 31 25 0 18 0 0 5 5 36 17 34 43 0 18...
2011 Mar 18
4
subset data frame with condition
Hello, One more question.. I have the data.frame "pop": xloc yloc gonad ind Ene W Area 1 23 20 516.74 1 0.02 20.21 1 2 23 20 1143.20 1 0.02 20.21 1 3 23 20 250.00 1 0.02 20.21 1 4 22 15 251.98 1 0.02 18.69 2 5 22 15 598.08 1 0.02 18.69 2 6 21 19 250.00 1 0.02 20.21 3 7...
2011 Feb 27
2
substract 2 data.frames
Hi! I have 2 data.frames: "fish" and "popn": >fish xloc yloc id birth size weight energy gonad 20 15 15 54 -60 107.9 63.0 15952.9 8.0 21 15 15 32 -60 105.1 61.4 15538.8 7.8 91 4 43 96 -60 118.9 69.4 17573.2 8.8 71 32 4 64 -60 121.6 71.0 17976.0 9.0 34 2 64 20 -60 116.2 67.9 17173.0 8.6 95 6 20...
2011 Jan 26
1
return object from loop inside a function
...I have a for loop inside the function and I cannot get UUU to give me an updated grid.dens object when I run the function (it does update when I run just the for loop). Here's a simplified version of my function: UUU=function(pop, grid.dens) { for (i in 1:10){ Food=grid.dens[pop$yloc[i],pop$xloc[i]] #use initial grid.dens values Consumed=(pop$weight[i]*0.25) Left=Food-Consumed grid.dens[pop$yloc[i],pop$xloc[i]]=Left #update grid.dens values on i pop$birth[i]=pop$birth[i]+1 } return(pop) return(grid.dens) } I get an updated pop, but not an updated grid.dens. What am I doing wrong? Th...
2010 Sep 15
2
how to superimpose 2 matrices of different sizes
Hi All, I?m trying to superimpose (or "add") two matrices: 1. resulting from a table function with frequencies: > U=table(pop$xloc, pop$yloc)) 14 15 16 17 18 19 20 21 22 5 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 9 0 5 10 0 0 0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 0 0 2. The second created to match my spatial grid (20x25...
2013 Feb 11
2
how to make a median line thicker in bwplot (lattice)
Hello, I am drawing a boxplot using bwplot in lattice. I would like to learn how to draw a thicker median line instead of the default setting. Thank you. Code bwplot(........, pch=rep("|",2)) Elaine [[alternative HTML version deleted]]
2012 Dec 11
2
lattice question: how to change the dot on boxplot to line
Hi, How does one change the dot for the median in a boxplot drawn using lattice? I have been looking at > names(trellis.par.get()) [1] "grid.pars" "fontsize" "background" [4] "panel.background" "clip" "add.line" [7] "add.text" "plot.polygon"
2012 Jul 27
1
overlaying a set of 'grouping' lines on a plot from image()
Hi, I have a matrix that I am displaying via image. I would like to obtain an image where the columns are 'grouped' (I have a grouping variable). But I am not sure how how I can draw the lines to indicate the grouping in the margin. I realize this is essentially waht heatmap does but as I have a set of custom breaks and colors I wanted to generate this via image. I can see that it is a
2005 May 31
11
More Tests for 2.4.0-RC2 - strange behaviour
...ead first rest + ''['' x#ZONE = xINCLUDE '']'' + echo ''#ZONE INTERFACE BROADCAST OPTIONS GATEWAY'' + read first rest + ''['' x# = xINCLUDE '']'' + echo ''# '' + read first rest + ''['' xloc = xINCLUDE '']'' + echo ''loc eth1 detect dhcp'' + read first rest + ''['' xnet = xINCLUDE '']'' + echo ''net eth0 detect norfc1918,nobogons'' + read first rest + ''['' xnet = xINCLUDE '']...