About me | pbdR Tech | HPSC | Phyloclustering | R_note |

 R_note -- The Exploration of Statistical Software R (統計軟體 R 深度歷險)
Reference
MS Windows

Batch jobs
Function
Data/MySQL
Plot
String/Parse

Remark Lines
Classes/S3
S4 Methods
Batch more
Environment

Good Coding
Fast Loop
LAM/MPI/Rmpi
Recursion

PHP Call R
Basic C
R Call Fortran/C
R Call GSL
C Call R API
C Call R Objects
Standalone

Make Packages
C Pointer
Debug

Section: String/Parse

• String process
Function `paste()`, `nchar()`, `strsplit()`, `substr()`, `match()`, ...

 ```a <- paste("string", 9:1, ".txt", sep = "") nchar(a) strsplit(a, "\\.") substr(a, 1, 6) <- "Substr"; a match("Substr9.txt", a) ```

• Regulas expression
Function `grep()`, `gsub()`, ...

 ``` a <- paste("string", 9:1, ".txt", sep = "") grep("([1,3,5-7])", a) b <- paste("string", 9:1, ".txt", sep = "", collapse = " ") gsub("([1,3,5-7]).(txt)", "_\\1-\\2", b) ```

• Expression and Parse
Function `expression()`, `parse()`, ... These are important functions for computing in text and useful for processing automatically jobs as shown in "Batch more".

 ``` a <- 0.05 expression(alpha == 0.05) (ret <- parse(text = paste("alpha == ", a, sep = ""))) plot(1, 1, main = ret) text(1, 1.2, ret) ```

 [ Go to top ]

 Maintained: Wei-Chen Chen E-Mail: wccsnow @ gmail.com Last Revised: Dec 12 2016, 09:44 (CST Taipei, Taiwan) Created: Oct 06 2003 Best Resolution IE6.0 1280x1024 small font