| numeric_string {cwhstring} | R Documentation |
numeric_string Test whether the elements of a character vector
represent legal numbers only.
all_digits Test whether the elements of a character vector consist of digits only
intToASCII Show character or octal representation at a place in the ASCII sequence
intToBase Convert an integer number to string representation in a base between 2 and 16 inclusive
intToOct Convert an integer number to string representation in octal
intToHex Convert an integer number to string representation in hexadecimal
numeric_string(str) all_digits(str) intToASCII(i) intToBase(i,Base=2) intToOct(i) intToHex(i)
str |
A character vector. |
i |
Integer number to be converted. |
Base |
Number base to be converted to. |
TRUE, FALSE string representation
Christian W. Hoffmann, christian.hoffmann@wsl.ch, http://www.wsl.ch/staff/christian.hoffmann
all_digits(c("1231","89a8742")) # TRUE FALSE
numeric_string(c("1231","8.9e-2",".7d2")) # [1] TRUE TRUE FALSE
intToASCII(1:255)
sapply(1:50,intToBase,2)
sapply(1:50,intToBase,7)
sapply(1:50,intToOct)
sapply(1:50,intToHex)