Extracting specific data from the database and making a graph from that

Hello, newbie here. I have big problems with learning r, since the syntax is quite complicated and previously i have used different stats programs. However, i have a question. I have a database with my data, it looks something like that:

species treatment type (1 or 2) tail length

white-breasted hedgehog 1 1.5 cm

west European hedgehog 2 1 cm

other hedgehog 1 0,9 cm

and so on.....

How can i extract the data, so i can make a graph for white breasted hedgehog's tail length for only treatment 1, and then a treatment 2 besides? And then how can i connect the graphs, to make a one big species comparison?

Thank you in advance.

Hi, welcome to the forum.

R can be just a bit confusing when you are just starting. Just to make things worse, I can think of at least 3 different ways to do what you want. The most common way today would be to use the {ggplot2} package. You, probably, will need to install it.

install.packages("ggplot2")

It would help us if you could supply a sample of your data in `dput() format. Do dput(mydata) where "mydata" is the name of your dataset.y For really large datasets probably dput(head(mydata, 100) will do. Paste it here between

```

```

This gives us an exact copy of the data to work with. I could make a number of guess on what to suggest but it would be much easier with some sample data to work with.