hello,
how can I do to drop C from this character C325 ?
_
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
elyakhlifi mustapha wrote:
hello,
how can I do to drop C from this character C325 ?
x - C325
substring(x, first=2)
[1] 325
gsub(C, , x)
[1] 325
gsub([A-Z], , x)
[1] 325
?substring
?gsub
_
elyakhlifi mustapha wrote:
hello,
how can I do to drop C from this character C325 ?
1. if C is always single and always first:
substring(C325,2)
2. more generic solution, drops all letters
sp-unlist(strsplit(C325,split=[A-Z]))
sp-sp[nchar(sp)0]
sp
--
View this message in context: