Displaying 20 results from an estimated 1534 matches for "g1".
2009 Oct 06
1
how to output profile plots for groups using lattice package
Dear R users,
I am trying to have an xyplot of a data set which has the following
variables:
case (n=10,20,30)
parameter (parm=a,b)
group (grp=g1,g2)
y (y values)
x (x=2,4,8)
My plot should be parameter by case such that I have 2 rows (each row= each
parameter) and 3 columns (each column=each case). My R-code is as follows
but I am not able to get what I want to:
tp1.sim <- xyplot(y~ x | case + parm , group=group, data = data, lty = 1:4...
2008 Sep 24
2
keep the row indexes/names when do aggregate
Hi, R-users,
If I have a data frame like this:
>x<-data.frame(g=c("g1","g2","g1","g1","g2"),v=c(1,7,3,2,8))
g v
1 g1 1
2 g2 7
3 g1 3
4 g1 2
5 g2 8
It contains two groups, g1 and g2. Now for each group I want the max v:
> aggregate(x$v,list(g=x$g),max)
g x
1 g1 3
2 g2 8
Beautiful. But what if I want to keep the...
2017 Jun 20
2
Help with the plot function
...99, 2000, 2001, 2002, 2003, 2004 )
T_MAR <- c(2.8, 6.5, 5.4,2.4, 4, 4.1, 3, 4.4, 4.5)
T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7)
T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2)
BUD <- c(87, 98, 93, 85, 89, 91, 87, 92, 92)
BUD_SE <- c(3.6, 2, 2.4, 4, 2.4, 2.4, 4, 2.4, 3)
g1 <- data.frame(YEAR, T_MAR, T_APR, T_MAY, BUD, BUD_SE)
###PLOT
dev.new(width=6.5, height=5)
par (cex=1, family="sans", mar=c(5,5,5,5.5))
plot(T_MAR~YEAR, type="l", pch=19, ann=F, axes=F, xlim=c(1996,2004),
ylim=c(0,12), data=g1)
title(ylab="Temperature (?C)",xlab=&...
2004 Jan 14
1
Collapsing a factor in R
...le trying to create
this new data frame. I can use the ave() function to find averages within a
subgroup but how do I maintain the Group/Gender factors after collapsing?
(see bottom table) Can anyone help??
Thanks in advance!!
Here's the starting point (table)
Age Group SubGroup Gender
12 g1 a f
32 g1 a f
81 g1 a f
63 g1 b m
24 g1 b m
24 g1 b m
70 g1 c f
82 g1 c f
71 g1 c f
61 g1 c f
25 g2 d m
29 g2 d m
43 g2 e f
17 g2 e f
42 g2 e f
55 g2 e f
52 g2 f f
19 g2 f f
12 g2 f f
The following is what I'm trying to achieve (as a new dataframe)
AvgAgeSubgroup Group Subgroup Gender
41.67...
2017 Jun 20
1
Help with the plot function
...99, 2000, 2001, 2002, 2003, 2004 )
T_MAR <- c(2.8, 6.5, 5.4,2.4, 4, 4.1, 3, 4.4, 4.5)
T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7)
T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2)
BUD <- c(87, 98, 93, 85, 89, 91, 87, 92, 92)
BUD_SE <- c(3.6, 2, 2.4, 4, 2.4, 2.4, 4, 2.4, 3)
g1 <- data.frame(YEAR, T_MAR, T_APR, T_MAY, BUD, BUD_SE)
par(mar=c(5,5,5,5))
plot(YEAR,T_MAR,pch=0,type="b",col="green",yaxt="n",ylim=c(-15,12),ylab="")
lines(T_MAR~YEAR, type="o", pch=19, col="green")
lines(T_APR~YEAR, type="o"...
2010 Feb 24
2
Question:How to get rid of missing values
Hi,
I want to draw a pie chart of level (variable) for each ID (variable). I have a big dataset, here I attach part of it.
ID level
1 G1
1 A1
1 A1
1 G1
1 G1
1 G1
1 A1
1 A1
1 G1
1 G1
1 G3
1 A1
1 G1
1 A1
1 A1
1 A2
1 A2
1 M
1 A1
1 G1
1 A1
1
1
1 A2
1 G3
1 A1
1 A1
1 A1
Below is my r code:
level <- na.exclude(level)
level.table <- table(level)
level.sum <- sum(level.table )
lbls <- round(level.t...
2017 Jun 20
2
Help with the plot function
....8, 6.5, 5.4,2.4, 4, 4.1, 3, 4.4, 4.5)
> > T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7)
> > T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2)
> > BUD <- c(87, 98, 93, 85, 89, 91, 87, 92, 92)
> > BUD_SE <- c(3.6, 2, 2.4, 4, 2.4, 2.4, 4, 2.4, 3)
> > g1 <- data.frame(YEAR, T_MAR, T_APR, T_MAY, BUD, BUD_SE)
> >
> > ###PLOT
> > dev.new(width=6.5, height=5)
> > par (cex=1, family="sans", mar=c(5,5,5,5.5))
> > plot(T_MAR~YEAR, type="l", pch=19, ann=F, axes=F, xlim=c(1996,2004),
> > ylim=c(0,12...
2017 Jun 20
0
Help with the plot function
...04 )
> T_MAR <- c(2.8, 6.5, 5.4,2.4, 4, 4.1, 3, 4.4, 4.5)
> T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7)
> T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2)
> BUD <- c(87, 98, 93, 85, 89, 91, 87, 92, 92)
> BUD_SE <- c(3.6, 2, 2.4, 4, 2.4, 2.4, 4, 2.4, 3)
> g1 <- data.frame(YEAR, T_MAR, T_APR, T_MAY, BUD, BUD_SE)
>
> ###PLOT
> dev.new(width=6.5, height=5)
> par (cex=1, family="sans", mar=c(5,5,5,5.5))
> plot(T_MAR~YEAR, type="l", pch=19, ann=F, axes=F, xlim=c(1996,2004),
> ylim=c(0,12), data=g1)
>
> title(yl...
2017 Jun 20
2
Help with the plot function
...gt;> > T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7)
> >> > T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2)
> >> > BUD <- c(87, 98, 93, 85, 89, 91, 87, 92, 92)
> >> > BUD_SE <- c(3.6, 2, 2.4, 4, 2.4, 2.4, 4, 2.4, 3)
> >> > g1 <- data.frame(YEAR, T_MAR, T_APR, T_MAY, BUD, BUD_SE)
> >> >
> >> > ###PLOT
> >> > dev.new(width=6.5, height=5)
> >> > par (cex=1, family="sans", mar=c(5,5,5,5.5))
> >> > plot(T_MAR~YEAR, type="l", pch=19, ann=F, axe...
2013 Jan 24
1
Pairwise Comparrisons
...ding window, do pairwise comparisons of sequence similarity. Coding the sliding window I think I can manage but what I''m trying to get to grips with is getting it so as every pairwise comparison is made, no matter how many genomes are added, from 3 to N.
So if I had four genome sequences, G1, G2, G3, G4 the comparisons would be:
G1:G1
G1:G2
G1:G3
G1:G4
G2:G2
G2:G3
G2:G4
G3:G3
G3:G4
G4:G4
I can think of a way this might be done with a very complicated loop, which would take the region in the window of each genome and then make all possible combination/comparrisons: So the loop would t...
2017 Jun 20
0
Help with the plot function
Hi
You are quite close. With slight modification of your code:
par(mfrow = c(2, 1))
par(cex = 0.6)
par(mar = c(0, 0, 0, 0), oma = c(4, 4, 0.5, 0.5))
par(tcl = -0.25)
par(mgp = c(2, 0.6, 0))
plot(BUD~YEAR, type="o", ann=F, axes=F, pch=19, ylim=c(60,100),data=g1)
axis(4, las=2)
mtext("Bud Break (Julian Day)", side=4, padj=4)
arrows(g1$YEAR,g1$BUD, g1$YEAR,g1$BUD + g1$BUD_SE, length=0.05, angle=90)
arrows(g1$YEAR,g1$BUD, g1$YEAR,g1$BUD-g1$BUD_SE, length=0.05, angle=90)
plot(T_MAR~YEAR, type="l", pch=19, ann=F, axes=F, xlim=c(1996,2004),...
2007 Dec 26
2
Two lines for outgoing calls
Dear All,
I'm using Asterisk 1.4.16.2 with Zaptel 1.4.7 on Debian with kernel
2.6.18.
I have two analog lines Zap/1 and Zap/2 as group 1 in zapata.conf. I'm
using below context for dialing out.
[outbound-local]
exten => _9XXX,1,Dial(Zap/g1/${EXTEN:1},30,tTr)
exten => _9XXXXX,1,Dial(Zap/g1/${EXTEN:1},30,tTr)
exten => _9ZXXXXXX,1,Dial(Zap/g1/${EXTEN:1},30,tTr)
exten => _9ZXXXXXXX,1,Dial(Zap/g1/${EXTEN:1},30,tTr)
exten => _90900XXXXX,1,Dial(Zap/g1/${EXTEN:1},30m,tTr)
When Zap/1 is busy and I try to call, it will use Zap/2 w...
2005 Aug 20
2
Ring more than two isdn phones simultaneously
I am using a HFC-S card in nt mode with zaphfc driver to connect an
internal isdn bus. I would like to signal an incoming call on, let's
say, 4 phones. Right now I use:
Dial(Zap/g1/21&Zap/g1/22&Zap/g1/24&Zap/g1/23&Zap/g1/29,,t)
where g1 are my two isdn channels provided by HFC-S card an the
21,22,etc my internal numbers.
When the command is executed however, only the first two specified
phones ring. Etc. with the first channel 21 ist called, with the secon...
2007 Jun 19
3
Controlling text and strip arrangement in xyplot
I've searched the archives and read the xyplot help but can't figure
out the 2 lattice questions below?
Consider:
library(lattice)
DF <- data.frame(x=rnorm(20), y=rnorm(20), g1=rep(letters[1:2], 10),
g2=rep(LETTERS[1:2], each=10),
g3=rep(rep(letters[3:4],each=5),2))
xyplot(y ~ x | g1 + g2, groups=g3, data=DF)
1) Is there a way to get one strip per row and column of panels as
below instead of the default?
_|__a__|__b__|
|
B...
2017 May 10
1
regression? no more separate xscreens
...0425
[ 6.951] (II) intel(G0): SNA compiled: xserver-xorg-video-intel
2:2.99.917+git20160325-1ubuntu1.2 (Timo Aaltonen <tjaalton at debian.org>)
[ 6.951] (II) intel(G0): SNA compiled for use with valgrind
[ 6.952] (II) modeset(0): using drv /dev/dri/card0
[ 6.952] (II) modeset(G1): using drv /dev/dri/card2
[ 6.952] (WW) Falling back to old probe method for fbdev
[ 6.952] (II) Loading sub module "fbdevhw"
[ 6.952] (II) LoadModule: "fbdevhw"
[ 6.952] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 6.952] (II) Module fbdevhw: vendor=&...
2013 Jul 18
1
Bland Altman summary stats for all column combinations
...P13003", "WCBP13004",
"WCBP13005", "WCBP13006", "WCBP13007", "WCBP13008", "WCBP13009",
"WCBP13010", "WCBP13011", "WCBP13012", "WCBP13013", "WCBP13014"
), class = "factor"), G1 = c(68, 68.6, 66.6, 73.1, 51.6, 50.1,
64.1, 73, 63.7, 43.2, 62.3, 59.2, 67.5, 68.2, 54.6, 67.9, 56.5,
54.2, 67.3, 68, 68.4, 67.9, 73.3, 51.7, 50.3, 63.9, 73.9, 64,
42.9, 62.5, 59.3, 66.7, 68.4, 54, 68.2, 56.8, 54.5, 67, 53.2,
41.4, 53, 52.3, 41, 37.4, 56.9, 65.3, 36.2, 35.3, 36.1, 32.5,
56.5,...
2017 Jun 20
0
Help with the plot function
...4.1, 3, 4.4, 4.5)
>> > T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7)
>> > T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2)
>> > BUD <- c(87, 98, 93, 85, 89, 91, 87, 92, 92)
>> > BUD_SE <- c(3.6, 2, 2.4, 4, 2.4, 2.4, 4, 2.4, 3)
>> > g1 <- data.frame(YEAR, T_MAR, T_APR, T_MAY, BUD, BUD_SE)
>> >
>> > ###PLOT
>> > dev.new(width=6.5, height=5)
>> > par (cex=1, family="sans", mar=c(5,5,5,5.5))
>> > plot(T_MAR~YEAR, type="l", pch=19, ann=F, axes=F, xlim=c(1996,2004),
&...
2009 Dec 29
2
pass functions and arguments to function
Hi,
I wonder how to pass several functions and their arguments as arguments to
a function. For example, the main function is
f = function(X ) {
process1(X)
...
process2(X)
}
I have a few functions that operate on X, e.g. g1(X, par1), g2(X, par2),
g3(X, par3). par1, par2 and par3 are parameters and of different types. I
would like to pass g1, g2, g3 and their arguments to f and g1, g2, g3 may
appear to be in different orders. So that final effect of the passing is
f = function(X ) {
process1(X)
g1(X, par1)...
2008 Dec 01
2
Difference between DAHDI/G1/0123456789 and DAHDI/g1/0123456789
Hello,
Groups in asterisk are summarized here (
http://www.voip-info.org/wiki/view/Channels+and+Groups).
Is there any difference between DAHDI/G1/0123456789 and DAHDI/g1/0123456789
(as I've been advised in another thread, to switch from one notation to the
other and I can't see the reason behind that) ?
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk...
2010 Jan 29
2
evaluating expressions with sub expressions
Hallo
I'm having trouble figuring out how to evaluate an expression when one of
the variables in the expression is defined separately as a sub expression.
Here's a simplified example
mat <- expression(0, f1*s1*g1) # vector of formulae
g1 <- expression(1/Tm) # expansion of the definition of g1
vals <- data.frame(f1=1, s1=.5, Tm=2) # one set of possible values for
variables
before adding this sub expression I was using the following to evaluate "mat"
sapply(mat, eval, vals)
Obviou...