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
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
Hi!
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?