Displaying 1 result from an estimated 1 matches for "decmod".
Did you mean:
demod
2004 Dec 01
3
Hexidecimal conversion
...number but I am having
a hard time reversing the operation. I'm good for hex representations to 159
and am close to extending to 2559. The archives are not clear on the
existence of a function for this task. Is there one?
Here is what I have got so far:
#Good for hex values to "9F"
as.decmode<-function(as.character(x)){
hexDigit<-c(0:9,LETTERS[1:6])
z<-matrix(c(strsplit(x, NULL),recursive=T),
length(x),2,byrow=T)
z.1<-as.numeric(z[,1])
z.2<- match(z[,2],hexDigit)-1
dec<-16*z.1+z.2...