RE: [R] More difficulties in getting data into R

2004-07-06 Thread Liaw, Andy
This is what I'd try: col2and4 <- matrix(scan(pipe("cut -d\| -f2,4 cmie_firm_data.text |"), skip=2), ncol=2, byrow=TRUE) Andy > From: Liaw, Andy > > Could it be that you happen you have `#' in `col4'? Try > either (or both): > > 1. read.table(..., comment.char="") > 2. sc

RE: [R] More difficulties in getting data into R

2004-07-06 Thread Liaw, Andy
Could it be that you happen you have `#' in `col4'? Try either (or both): 1. read.table(..., comment.char="") 2. scan(...) HTH, Andy > From: Ajay Shah > > In order to get around the problems of my posting a few minutes ago, I > thought: > > $ awk -F\| '(NR > 2) {print $2}' cmie_firm_data.text

[R] More difficulties in getting data into R

2004-07-05 Thread Ajay Shah
In order to get around the problems of my posting a few minutes ago, I thought: $ awk -F\| '(NR > 2) {print $2}' cmie_firm_data.text > col2 $ awk -F\| '(NR > 2) {print $4}' cmie_firm_data.text > col4 $ paste col2 col4 | head -2 -510.45 -510.27 60700 101900 $ paste col2 col4 | tail -2 28648.12