I think you are missing an |>
after
select(-upper, -lower)
Please do not send screenshots. They are difficult to work with. Your screenshot is very clear but often they are difficult to read.
It is much better to copy the code and paste it here between
```
```
This gives us formatted code that we can copy, paste and run . Often a person here does not have the time to type out code to test it and find a problem.
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
```
```
You may also find this useful.
FAQ: How to do a minimal reproducible example ( reprex ) for beginners
1 Like