x,a,b)
xabdf <- as.data.frame(t(xab))
# now get the a/b values
abyb <- xabdf[,2]/xabdf[,3]
HTH,
Arin Basu
>Message: 1
>Date: Sun, 18 Jul 2004 13:17:42 +0200
> From: PvR <[EMAIL PROTECTED]>
>Subject: [R] a problem: factors, names, tables ..
>To: [EMAIL PROTECTED]
>Mes
Yes, you are right ! I did not realise that the first variable is a
subset of the second. I tried this instead
> v1 <- rep( c(0, 2, 10, 11, 13, 14, 15), c(15, 6, 1, 3, 8, 15, 10) )
> v2 <- rep( c(0, 1, 2, 10, 11, 12, 13, 14, 15), c(817, 119, 524, 96,
700, 66, 559, 358, 283) )
> table(factor(v1))
Adaikalavan Ramasamy wrote:
Please give a reproducible example. Here is one way :
# generate example
v1 <- rep( c(0, 2, 10, 11, 13, 14, 15), c(15, 6, 1, 3, 8, 15, 10) )
t1 <- table(v1)
t1
v1
0 2 10 11 13 14 15
15 6 1 3 8 15 10
v2 <- rep( c(0, 1, 2, 10, 11, 12, 13, 14, 15), c(817, 119, 524
Please give a reproducible example. Here is one way :
# generate example
> v1 <- rep( c(0, 2, 10, 11, 13, 14, 15), c(15, 6, 1, 3, 8, 15, 10) )
> t1 <- table(v1)
> t1
v1
0 2 10 11 13 14 15
15 6 1 3 8 15 10
> v2 <- rep( c(0, 1, 2, 10, 11, 12, 13, 14, 15), c(817, 119, 524, 96,
700, 66, 559,
Hi all,
I am *completely* lost in trying to solve a relatively simple task.
I want to compute the relative number of occurences of an event, the data
of which sits in a large table (read from file).
I have the occurences of the events in a table 'tt'
0 2 10 11 13 14 15
15 6 1 3 8 15 10
.. m
PvR wrote:
Hi all,
I am *completely* lost in trying to solve a relatively simple task.
I want to compute the relative number of occurences of an event, the
data of which sits in a large table (read from file).
I have the occurences of the events in a table 'tt'
0 2 10 11 13 14 15
15 6 1 3 8