# plotting the effect of treatment on plants

#### lotw

##### New Member
Hello,

I have some plant data, which contains several plant groups. Within the plant groups there are different plant sizes (devided in groups). For each plant I noted whether it was infected before and after the treatment:

data = data.plant

> str(data.plant)

$Group.nr: Factor w/15 levels : "1" , "2" , "3" , "4".....$ Plant.nr: Factor w/30 levels :"1" , "2" , "3" , "4".....
$Size: Factor w/4 levels : "150", "200" , "250", "300"...$ Status: Factor w/2 levels: "Before" "After"
\$ Infection: Factor w/2 levels: "Infected" , "Not.Infected"...

(See attachment as well)

Now... I get lost in the structure. Because I am not sure how I have to structure my data in R to get the following data:

How much % within each plant size was infected before and got better again. Also the % within each plant size that was infected and is still infected after the treatment is interesting...

I'm also trying to create a graph like in the attachment/example here but I can't seem to make the right grouping... could someone help me...?? Thank you so much!

#### trinker

##### ggplot2orBust
You likely haven't gotten a response because this is not reproducible (there is not data to work with). Use sample and rnorm functions to make up data similar to your data.plant