Re: [R] Hex Decimal Convert

From: Edwin Sendjaja <edwin7_at_gmx.net>
Date: Mon, 07 Apr 2008 01:14:35 +0100

Dear John,

Thank you.

Is there any possibility to get original stored number printed.

Because i have another coloum like:

Protocol
"TCP" This is gonna cause probleme (as you notice before).

I dont really understand what you mean with a list. i am new with R.

Thanks,

Edwin

Am Sonntag, 6. April 2008 21:38:19 schrieb John Fox:
> Dear Edwin,
>
> There's a distinction between the way in which a number is stored
> internally and the way in which it's printed. R is reading the hex
> numbers correctly but is printing them in decimal. You can assign the
> class "hexmode" to the vector containing the data and then it will
>
> print in hex:
> > data <- c(6565, 0x47780439, 0x00000000, 0x00000000, 0)
> > data
>
> [1] 6565 1199047737 0 0 0
>
> > class(data) <- "hexmode"
> > data
>
> [1] "000019a5" "47780439" "00000000" "00000000" "00000000"
>
> Notice that the whole vector is printed in hex. If you don't want that,
> then you could put the data into a list with some members of class
> "hexmode" and others not.
>
> I hope this helps,
> John
>
>
>
> On Sun, 6 Apr 2008 20:52:20 +0100
>
> Edwin Sendjaja <edwin7_at_gmx.net> wrote:
> > Hello,
> >
> > I have a data with hexdecimal. But GNU R convert it to strange
> > number. How can
> > I get that hexdecimal showing in the R-table?
>
> ---------------------------------------------------------------------------
>--------------
>
> > My Data-Table:

> > Sender_ID Receiver_ID Other_ID
> > 6565 0x47780439 0x00000000 0x00000000 0
>
> ---------------------------------------------------------------------------
>-------------
>
> > R-Table:
> >
> > 6565 1199047737 0 0 0
> >
> >
> >
> >
> > Kind Regards,
> >
> > Edwin
> >
> > ______________________________________________
> > R-help_at_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.
>
> --------------------------------
> John Fox, Professor
> Department of Sociology
> McMaster University
> Hamilton, Ontario, Canada
> http://socserv.mcmaster.ca/jfox/
>
> ______________________________________________
> R-help_at_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.



R-help_at_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. Received on Mon 07 Apr 2008 - 00:19:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 07 Apr 2008 - 01:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive