I have one data sets with name DATA_TEST.This data frame contain 7-observations in character format.You can see table below.
#DATA SET
DATA_TEST<-data.frame(
Ten_digits=c("NA","207","0101","0208 90","0206 90 99 00","103","9706 00 00 00"),
stringsAsFactors = FALSE)
View(DATA_TEST)
So my intention is to convert this data frame with a stringr or other package like picture below. Actually the code needs to do one thing or more precisely first must found only variables with 10 digits like "0206 90 99 00" or "9706 00 00 00" and convert this variables into variables without space "0206909900" and "9706000000". In the table below you can see finally what the table should look like.
So can anybody help me how to resolve this problem?