I have a CSV with a bunch of data like so:
> test.csv <- read.csv("~/Desktop/stats.csv")
> test.csv
m lvl a b c a_pct b_pct c_pct d_pct
1 543557 2A 13 255 59.6666667 18.8 10.2 1.6 5.1
2 545059 2A 0 19 4.0000000 15.8 15.8 5.3 10.5
I want to be able to do a histogram of like a_pct
using hist(test.csv$a_pct)
but only on qualifying rows, where like c_pct
> 20 or c
< 200, etc. Sort of like a SQL WHERE clause. Is there a way to do this easily in R?