Re: [R] problem about set operation and computation after split

2012-06-12 Thread bestbird
can anyone help me? -- View this message in context: http://r.789695.n4.nabble.com/problem-about-set-operation-and-computation-after-split-tp4632496p4633192.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing l

[R] problem about set operation and computation after split

2012-06-06 Thread bestbird
hi, I met some problems in R, plz help me. 1. How to do a intersect operation among several groups in one list, without a loop statement? (I think It may be a list) create data: myData <- data.frame(product = c(1,2,3,1,2,3,1,2,2), year=c(2009,2009,2009,2010,2010,2010,2011,2011,2011),value

Re: [R] plz help. how to filter/group/sort data on mass data

2012-06-06 Thread bestbird
thank you. diff can do this -- View this message in context: http://r.789695.n4.nabble.com/plz-help-how-to-filter-group-sort-data-on-mass-data-tp4630714p4632494.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mai

Re: [R] plz help. how to filter/group/sort data on mass data

2012-05-28 Thread bestbird
I have know how to sort and filter and group. can anyone answer my another question? Is there any function in R like *lead *and *lag * in SQL. They are relative position function. We can use them to solve problem such as : on year-on-year basis, link relative ratio can anyone give a tips? -- Vie

Re: [R] plz help. how to filter/group/sort data on mass data

2012-05-21 Thread bestbird
any suggestion? plz help me. -- View this message in context: http://r.789695.n4.nabble.com/plz-help-how-to-filter-group-sort-data-on-mass-data-tp4630714p4630820.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

[R] plz help. how to filter/group/sort data on mass data

2012-05-21 Thread bestbird
hi, nice people I needs to compute the product whose annual sales values are all among the top 100 using R ( version 2.15.0) data is stored in the MSSQL database. data structure( sales table's fields): productID, time, value I have found the SQL solution below