new to R and I hope to find solution to my practice task

As @ randyzwitch says.

This may help you show us what you are doing.

FAQ: How to do a minimal reproducible example ( reprex ) for beginners

A handy way to supply data is to use the dput() function. Do dput(mydata) where "mydata" is the name of your dataset. For really large datasets probably dput(head(mydata, 100)) will do. Paste the output between
```

```

2 Likes