[R] id & filter problems in data.frame

Christian Schulz c.schulz at metrinomics.de
Tue May 28 13:03:22 CEST 2002


Renault,
really thanks !

(2.problem) example:
id   filterCriteria    ratingOfSatisfaction        ProductType
1        Man
1                               60                                A
1                               40                                B
3       Women           
3                                20                                A
5        Man
5                                 40                               A
5                                 100                             B
5                                  80                              C

I know that's no a perfect  database model .
But  the dataset is much longer and now i have got a problem
i.e filter the ratingOfSatisfaction with gender!

Is there a possibilty to write a function in the really flexible R , which
autocount (copy the rows under the first row per ID for the filterCriteria)
until a new Id starts and again ....

  
Thanks for
advance & regards,Christian



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list