Displaying 2 results from an estimated 2 matches for "rule_v1".
Did you mean:
rule1
2008 Jun 06
1
Agreggating data using external aggregation rules
...an grows depending
on the rule. Just to give an idea, the first "rule" in v1 maps 820
different values into 7 ones.
Using SQL and a database this can be done in a very straightforward way
(for example on the variable v1):
Select COD_OUT, v2, v3, v4, v5, v6, v7, sum(measure)
>From DF, RULE_v1
Where v1=COD_IN
Group by v2, v3,v4, v5, v6, v7
So the first choice would be using a database; the second one would be
splitting the data frame and then joining the results.
Is there any other possibility to merge+aggregate caused by the merge ?
Thank you in advance
Angelo Linardi
** Le e-mail...
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame.
For instance
> ddTable <-
data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry"))
I want a dataset that is
Id Name
1 Paul
2 Bob
> unique(ddTable)
Will give me all 4 rows, and
> unique(ddTable$Id)
Will give me c(1,2), but not accompanied by the name column.