[R] Splitting a file into multiple files based on the column name

kayj kjaja27 at yahoo.com
Fri Oct 3 20:48:54 CEST 2008


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_SB    K99_Sick    L913_BB  

I would like to split the data , one file contains the data with column
names containing the words “Sick” or “SB” and have the rest of the data in
another file.

I appreciate your help,

View this message in context: http://www.nabble.com/Splitting-a-file-into-multiple-files-based-on-the-column-name-tp19803535p19803535.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list