I split a biological sample into multiple "tiles" using a program called QuPath and I'm using R to parse the data. I was hoping to divide the tiles into different buckets based on the percentage of the tile is taken up by stroma (0-10%, 10-20%, etc.). Ideally, I'd like something like the below table, but anything where I can get counts of the number of tiles that fall into the percentage "buckets" will be just fine.
Tile | Percent Stroma | Percent Stroma |
---|---|---|
Tile 1 | 5% | 0-10 |
Tile 2 | 15% | 10-20 |
Tile 3 | 9% | 0-10 |
Tile 4 | 45% | 40-50 |
Tile 5 | 61% | 60-70 |
Tile 6 | 42% | 40-50 |
Tile 7 | 55% | 50-60 |
I've done something like this before with a simple ifelse function, but I'm very new to R and wanted to know if there's a more efficient way to do it.