octmode {base} | R Documentation

## Display Numbers in Octal

### Description

Convert or print integers in octal format, with as many digits as are needed to display the largest, using leading zeroes as necessary.

### Usage

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

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

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

### Arguments

`x` | An object inheriting from class `"octmode"`.
`...` | further arguments passed to or from other methods.

### Details

Class `"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 `755`. Subsetting (`[`) works too.

### See Also

These are auxiliary functions for `file.info`.

`hexmode`

### Examples

    (on <- structure(c(16,32, 127:129),  class = "octmode")) #-> print.*()
    ##-> "020" "040" "177" "200" "201"
    unclass(on[3:4]) # subsetting

[Package base version 2.5.0 Index]