On Wed, Oct 8, 2014 at 6:02 AM, <mark.ho...@srs.gov> wrote:

> I am trying to read in data from an instrument that is recorded in
> hexadecimal format. Using either:
>
>     y.hex <- read.table(file="hex.data", as.is=TRUE)
>
> or
>
>     y.hex <- read.table(file="hex.data", text=TRUE)
>
> gets all the data in just fine except points like `055E` or `020E`. In
> these cases, the E is stripped so I get just 055 or 020.
>
> The question is how should this data be imported to avoid the E-ending
> problem?
>
> (By the way, my follow-up is to convert this data using, `y <-
> strtoi(y.hex, 16L)`)
>
> Thanks for any suggestions,
>

​Please don't post in HTML, it is against forum policy. And it often
results in poorly formatted messages, which many ignore.​

​Try:

y.hex <- read.table(file="hex.data",as.is=TRUE,colClasses="character");​



>
> Mark Hogue
>


-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! <><
John McKown

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to