Rev 89620 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/utils/man/bitstring.Rd% Part of the R package, https://www.R-project.org% Copyright 2026 R Core Team% Distributed under GPL 2 or later\name{bitstring}\title{Bit-level representation of R atomic vectors}\alias{bitstring}\alias{bitstring.default}\alias{bitstring.raw}\alias{bitstring.integer}\alias{bitstring.numeric}\alias{format.bitstring}\alias{print.bitstring}\usage{bitstring(x)\method{bitstring}{raw}(x)\method{bitstring}{integer}(x)\method{bitstring}{numeric}(x)\method{bitstring}{default}(x)\method{format}{bitstring}(x, sep = " ", ...)\method{print}{bitstring}(x, ...)}\arguments{\item{x}{ For \code{bitsring()}, an atomic R vector. Currentlyinteger, numeric, and raw vectors are supported.For the \code{\link{format}} and \code{\link{print}} methods, anobject of class \code{"bitstring"}.}\item{sep}{ character string to be used as visual breakpoints betweensign bit, mantissa, and exponent, as appropriate.}\item{...}{ additional arguments for compatibility; ignored. }}\description{This is a simple user-friendly wrapper for \code{\link{intToBits}}etc., inspired by the Julia function \code{bitstring}.}\value{An object of class \code{"bitstring"} which stores the bit patterns ofthe underlying vector as character strings, along with typeinformation.\code{format.bitstring} formats a bitstring object for user-friendlydisplay.}\examples{x <- bitstring(pi^((-3):3))xprint(x, sep = "-")bitstring(seq(-3, 3))bitstring(seq(-3, 3) |> as.numeric())bitstring(c(NA_real_, NaN, Inf, -Inf))bitstring(NA_integer_)bitstring(charToRaw("bits"))}\keyword{utilities}