\HeaderA{octmode}{Display Numbers in Octal}{octmode}
\aliasA{as.character.octmode}{octmode}{as.character.octmode}
\aliasA{as.octmode}{octmode}{as.octmode}
\aliasA{format.octmode}{octmode}{format.octmode}
\aliasA{print.octmode}{octmode}{print.octmode}
\aliasA{[.octmode}{octmode}{[.octmode}
\keyword{print}{octmode}
\begin{Description}\relax
Convert or print integers in octal format, with as many digits as are
needed to display the largest, using leading zeroes as necessary.
\end{Description}
\begin{Usage}
\begin{verbatim}
as.octmode(x)

## S3 method for class 'octmode':
as.character(x, ...)

## S3 method for class 'octmode':
format(x, ...)

## S3 method for class 'octmode':
print(x, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An object, for the methods inheriting from class \code{"octmode"}.
\item[\code{...}] further arguments passed to or from other methods.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Class \code{"octmode"} consists of integer vectors with that class
attribute, used merely to ensure that they are printed in octal
notation, specifically for Unix-like file permissions such as
\code{755}.  Subsetting (\code{\LinkA{[}{[}}) works too.

\code{as.octmode} can convert integers (of \LinkA{type}{type} \code{"integer"} or
\code{"double"}) and character strings to class \code{"octmode"}
\end{Details}
\begin{SeeAlso}\relax
These are auxiliary functions for \code{\LinkA{file.info}{file.info}}.

\code{\LinkA{hexmode}{hexmode}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
(on <- structure(c(16,32, 127:129),  class = "octmode")) #-> print.*()
##-> "020" "040" "177" "200" "201"
unclass(on[3:4]) # subsetting
\end{ExampleCode}
\end{Examples}

