The R Project SVN R

Rev

Rev 61150 | Rev 68948 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61150 Rev 61168
Line 82... Line 82...
82
}
82
}
83
\seealso{
83
\seealso{
84
 \code{\link{strsplit}}, \code{\link{paste}}, \code{\link{nchar}}.
84
 \code{\link{strsplit}}, \code{\link{paste}}, \code{\link{nchar}}.
85
}
85
}
86
\examples{
86
\examples{
87
substr("abcdef", 2,4)
87
substr("abcdef", 2, 4)
88
substring("abcdef" ,1:6, 1:6)
88
substring("abcdef", 1:6, 1:6)
89
## strsplit is more efficient ...
89
## strsplit is more efficient ...
90
 
90
 
91
substr(rep("abcdef", 4), 1:4, 4:5)
91
substr(rep("abcdef", 4), 1:4, 4:5)
92
x <- c("asfef", "qwerty", "yuiop[", "b", "stuff.blah.yech")
92
x <- c("asfef", "qwerty", "yuiop[", "b", "stuff.blah.yech")
93
substr(x, 2, 5)
93
substr(x, 2, 5)