Question: new here so forgive me if this sounds dumb.

I am currently working on a project, the data set has a variable that consists of two digits. For example 12 or 34. The second digit is from 1 to 5 and I need to isolate this one. There are round about 18 000 observations so doing this manually is not an option for me.

I tried the seperate function from dplyr.

```
demog %>% separate(socioEcon, c("A", "B"))

```

I also tried a couple of other things which I already deleted.

How would you guys try to split the data?

Answer: 
```r
demog %>% mutate(B = socioEcon %% 10)

```
```
demog <- data.frame(socioEcon = c(12,34))

library(stringr)
demog[, c("A", "B")] <- as.numeric(str_split_fixed(demog$socioEcon, "", 2))

```