0

I have a data set containing 5136 observation and 4 variables. The column names are "ID", "Family", "Species", "State". There are 36 unique name or character in 4th column. Now, I added new column as "Zone" in which I want to assign the unique characters variables of 4th column into the new column based on their bigegraphy like "EastHim", "WestHim", "WestGhat", "DecPen" and "AridReg" based on their biogeography. For example, c("Assam", "Arunachal", "Meghalya", "Mizoram") into EastHim and so on.

Added column using tidyverse package. df4 <- df3 %>% add_column(Zone = " ", .before = "Status") Guide me please. Thanks

  • 3
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Jul 01 '21 at 16:53

0 Answers0