Creating multiple variables efficiently

Hi @Vodstrup, welcome to RStudio Community.

It would be much easier to help you if we could see what your data looks like. You could share your data in an easy-to-copy format by posting the output of dput(df) where df is the name of the data frame. If your data has too many rows you can restrict it to a small sample with dput(head(df, n = xx)) where xx is the number of rows you want to extract.

If your data is private, please create a minimal reproducible example by following the guide below.