You can read the data in, then use 'grep' to determine which rows
match, then write the files out:
x <- read.table()
rowIndx <- grep("Sick|CB", x$col)
write.table(x[rowIndx,], file="match")
write.table(x[-rowIndx,], file="nomatch")
On Fri, Oct 3, 2008 at 2:48 PM, kayj <[EMAIL PROTECTED]> wrot
Hi,
I have a txt file here I want to split it into different files based on the
column name if it contains a specific word or part of a word. For example,
If the header looks like
A001_Sick A015_SBK99_SickL913_BB
I would like to split the data , one file contains the data with
2 matches
Mail list logo