[R] Read.table fail to recognize (+/-) sign

Gundala Viswanath gundalav at gmail.com
Mon Oct 6 15:53:02 CEST 2008


Dear all,

I have the following dataset:

# HIT or acc, UCSC genome, chromosome, strand, start, end, species name
HIT000000001    hg18    chr8    +   1759549 1894206 Human
HIT000000005    hg18    chr11   -   8593662 8636959 Human
HIT000000007    hg18    chr5    +   31675274    32146794    Human
HIT000000011    hg18    chr5    +   79739648    79810715    Human

(also downloadable at http://dpaste.com/82688/plain/  )

However with the following command:

> source <- read.table("clipboard")
> source
                V1   V2    V3 V4        V5        V6    V7
1     HIT000000001 hg18  chr8  0   1759549   1894206 Human
2     HIT000000005 hg18 chr11  0   8593662   8636959 Human
3     HIT000000007 hg18  chr5  0  31675274  32146794 Human
4     HIT000000011 hg18  chr5  0  79739648  79810715 Human

Note that the V4 column read.table fail to capture the PLUS/MINUS sign,
it gives 0 instead.

Is there a way I can enable read.table to recognize those signs?


- Gundala Viswanath
Jakarta - Indonesia



More information about the R-help mailing list