I have a problem with separating inside a column
The data inside that column is a code for a device location looks like this SE005 or H0002 or MANA. the S is a device that is mobile and the letter after that states where it is used.
SE005 is the fifth a mobile device place E.
H0002 is immobile device number 2 at place H.
MANA is a device at one place
for my analysis in power BI I need to no how many articles where scanned on a device at a place I don’t care about which device exactly. Because Power BI can't summarise per placement of the device (because its a combined value inside a column) I want to split it up.
I want it to look like this.
v1 v2 v3
SE005 becomes S E 005 # 2 separations
H0002 becomes H 005 #1 separation and one deleted number
MANA MANA #R should not change this but is should be inside the same column as E and H
I have to apply this to 8 million rows. And I think it must be done in two or 3 steps first separate the letters from the numbers. And note that there are more letters than the one in the preview. But the arrangement is the same. Any help is appreciated.
EDIT
just want to split op the device column so power bi can work with it.
art <- c(1:100)
device <-c("SE05", "H005", "E003", "MANA", "J012", "X021", "W007", "MANA", "SE02", "H005",
"SE05", "H005", "E003", "MANA", "J012", "X01", "W007", "MANA", "SE02", "H005",
"SE05", "H007", "E003", "MANA", "J012", "X02", "W007", "MANA", "SE02", "H005",
"SE05", "H008", "E004", "MANA", "J012", "X021", "W007", "MANA", "SE02", "H005",
"SE05", "H005", "E003", "MANA", "J012", "X017", "W007", "MANA", "SE02", "H005",
"SE05", "H0010", "E008", "MANA", "J012", "X021", "W007", "MANA", "SE02", "H005",
"SE05", "H005", "E003", "MANA", "J012", "X009", "W007", "MANA", "SE02", "H005",
"SE05", "H0010", "E0010", "MANA", "J012", "X021", "W007", "MANA", "SE02", "H005",
"SE05", "H005", "E003", "MANA", "J012", "X021", "W007", "MANA", "SE02", "H005",
"SE05", "H009", "E003", "MANA", "J012", "X021", "W007", "MANA", "SE02", "H005")
ACCEPT <- as.data.frame(art)
ACCEPT$device <- device
head(BLABLA)
Article device V3 V4
1 52290 SE05 20170223 162756
2 52300 SE05 20170223 162758
3 10090 SE05 20170223 162831
4 10060 SE08 20170223 162834
5 10070 SE08 20170223 162839
6 10070 SE08 20170223 162859