I have two columns in a data table in `R`. One is race and the other is ethnicity. I would like to combine these two columns to make one new column labeled R/E. However, I am having difficulty combining the variables because I want to replace the variable of one column from another in certain circumstances without replacing the variables for the entire column.

Let's say I have these two columns.

```
Ethnicity <- c("Hispanic or Latino", "Not Hispanic or Latino", "Not Hispanic or Latino", "Neither", "Neither")

Race <- c("Neither", "Asian", "Neither", "Asian", "Neither")

```

Desired Column (R/E): `c("Hispanic or Latino", "Asian", "Not Hispanic or Latino", "Asian", "Neither")`

I want to create one column where I can combine these variables accordingly.
I have tried to use ifelse but I am not sure of the correct syntax.

I basically want to say:
If ethnicity = "Hispanic or Latino" -> R/E = "Hispanic or Latino",
If ethnicity = "Unknown" or ethnicity = "Not Hispanic or Latino", then check "Race"

Can I use `ifelse` to do this? Or is there another function I can use to achieve this?

I am not sure where to go from

```
NewData$R/E <-ifelse(NewData$Etn<= Hispanic or Latino, "Hispanic or Latino",  ifelse(NewData$Etn<= Neither,

```