Esto funciona para convertir una cadena de un solo carácter del tipo que ha descrito en un vector de raws.
## The string I think you're talking about
dat <- "\\x1f8b080000000000"
cat(dat, "\n")
## \x1f8b080000000000
## A function to convert one string to an array of raw
f <- function(x) {
## Break into two-character segments
x <- strsplit(x, "(?<=.{2})", perl=TRUE)[[1]]
## Remove the first element, "\\x"
x <- x[-1]
## Complete the conversion
as.raw(as.hexmode(x))
}
## Check that it works
f(dat)
## [1] 1f 8b 08 00 00 00 00 00