On Aug 24, 2009, at 12:24 AM, Steven Kang wrote:
Hi David,
I have another question regarding the R statement you have provided
which is:
for (zz in unique(a$xx) ) assign( paste("sub.a", zz, sep="."),
sum(subset(a, xx==zz)$xxx) )
If the xx variables were characters instead of nume
On Aug 23, 2009, at 10:51 PM, Steven Kang wrote:
> David, apreciate for your help.
>
> However, the result is not what I was expecting.
>
> Following on from your code, for example say the input is:
>
>a <- data.frame(x=rep(1:4,2), y=rep(4:7,2), xx=rep(8:11,2),
> xxx=rep(12:15,1))
>
>
On Aug 23, 2009, at 10:51 PM, Steven Kang wrote:
David, apreciate for your help.
However, the result is not what I was expecting.
Following on from your code, for example say the input is:
a <- data.frame(x=rep(1:4,2), y=rep(4:7,2), xx=rep(8:11,2),
xxx=rep(12:15,1))
x y xx x
David, apreciate for your help.
However, the result is not what I was expecting.
Following on from your code, for example say the input is:
a <- data.frame(x=rep(1:4,2), y=rep(4:7,2), xx=rep(8:11,2),
xxx=rep(12:15,1))
x y xx xxx
1 1 4 8 12
2 2 5 9 13
3 3
On Aug 23, 2009, at 10:12 PM, David Winsemius wrote:
On Aug 23, 2009, at 9:56 PM, Steven Kang wrote:
Dear R users,
I am using "subset" function to filter out specific conditions and
would
like to use the value of subsetted argument as a name of an object.
Specifically, from the followin
On Aug 23, 2009, at 9:56 PM, Steven Kang wrote:
Dear R users,
I am using "subset" function to filter out specific conditions and
would
like to use the value of subsetted argument as a name of an object.
Specifically, from the following statement:
a <- subset(dat, dat$x == "A" & dat$xx
Dear R users,
I am using "subset" function to filter out specific conditions and would
like to use the value of subsetted argument as a name of an object.
Specifically, from the following statement:
a <- subset(dat, dat$x == "A" & dat$xx == 1 & dat$xxx == "AB" & dat$y
== "B" & dat$yy == 2)
7 matches
Mail list logo