new response variable

Without a reproducible example and knowing how your data is formatted, it is very hard to answer. Please look into this FAQ on producing a reproducible example. FAQ: How to do a minimal reproducible example ( reprex ) for beginners

It sounds like you are a new user to R and need a tutorial. I suggest https://r4ds.had.co.nz/ and you'll see how to create new variables using the mutate function in Chapter 5 (Data transformation)