For integers, you can use
a = a + bb = a - ba = a - b
and for strings, this would work
a <- "one"b <- "two"a <- paste(a,b, sep = "")b <- substr(a,0,nchar(a) - nchar(b))a <- substr(a,nchar(b) + 1, nchar(a))> a# two> b # one
For integers, you can use
a = a + bb = a - ba = a - b
and for strings, this would work
a <- "one"b <- "two"a <- paste(a,b, sep = "")b <- substr(a,0,nchar(a) - nchar(b))a <- substr(a,nchar(b) + 1, nchar(a))> a# two> b # one