Hi, do you know, a method to convert an hexadecimal value to the corresponding integer value (decimal) ? thinks for help. Romain -- Lorrilli?re Romain UMR 8079 Laboratoire Ecologie, Syst?matique et Evolution B?t. 362 Universit? Paris-Sud 91405 Orsay cedex France tel : 01 69 15 56 85 fax : 01 69 15 56 96 mobile : 06 81 70 90 70 email : romain.lorrilliere at ese.u-psud.fr
On 5/24/2006 11:01 AM, Romain Lorrilliere wrote:> Hi, > > do you know, a method to convert an hexadecimal value to the > corresponding integer value (decimal) ?as.double (which is called by as.numeric) automatically converts hex to numeric values. You need to make sure the hex strings have a "0x" prefix, e.g. > as.numeric("0x0A") [1] 10 You can use paste() or gsub() to put the prefix on existing strings. Duncan Murdoch