I have a data frame that is similar to this small sample:
Tree variable value
1 x1 0
2 x2 1
3 x3 0
4 x1 2
5 x2 1
6 x3 1
My question is:
How do I extract, say, just the x1 values and make it a data frame?
I'm not sure if this requires an if statement or if there's a better way in R to do this?
Any advice is greatly appreciated.