Creating new variables out of existing data set in r

Does anyone know how I would create a new variable in an already existing data set I have imported?

I want to create a new variable that divides 2 categories of data and create a new variable in my data set from that number


To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

Have you looked at the mutate() verb in the dplyr package?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.