Is it possible to aggregate or use subset whilst using a regular expression simultaneously in R?
The problem I am trying to solve is this: I have a data frame called 'wpbCellFeatures' with multiple columns including a unique identifier 'rowColFoVCell':
rowColFoVCell wpbCount meanFeret meanPerim meanCirc meanAR meanRound meanSolidity
1 001001001001 38 1.182632 3.047368 0.7560526 1.948947 0.6036842 0.8289474
2 001001001002 8 1.886250 4.493750 0.7537500 2.365000 0.5350000 0.8325000
This column contains numbers '001001001001', '001001001002', '001001001003', ... ... , '001003004002', ... etc. The numbers forming this ID correspond to row number, column number, field of view and cell number, so for example '001003004002' is the first row, third column, fourth field of view and second cell.
I would like to select all identifiers with rows between 1 and 3 for example, and aggregate into a new data frame. How can I do this in R, I think it will involve using aggregate and regular expressions but I am not so familiar with this?
Thanks