Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

raw_deparse_str

Serialize a raw vector to a string


Description

Experimental lifecycle

This function converts a raw vector to a hexadecimal string, optionally adding a prefix and a suffix. It is roughly equivalent to paste0(prefix, paste(format(x), collapse = ""), suffix) and much faster.

Usage

raw_deparse_str(x, prefix = NULL, suffix = NULL)

Arguments

x

A raw vector.

prefix, suffix

Prefix and suffix strings, or 'NULL.

Value

A string.

Examples

raw_deparse_str(raw())
raw_deparse_str(charToRaw("string"))
raw_deparse_str(raw(10), prefix = "'0x", suffix = "'")

rlang

Functions for Base Types and Core R and 'Tidyverse' Features

v0.4.11
MIT + file LICENSE
Authors
Lionel Henry [aut, cre], Hadley Wickham [aut], mikefc [cph] (Hash implementation based on Mike's xxhashlite), Yann Collet [cph] (Author of the embedded xxHash library), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.