inc-dec

0th

Percentile

Increment and Decrement

inc<- increments x by value. Equivelent to x <- x + value.

dec<- decrements x by the value. Equivelent to x <- x - value.

Keywords
utilities, manip
Usage
inc(x) <- value

dec(x) <- value

Arguments
x

object to be incremented or decremented

value

value by which x will be modified

Aliases
  • inc<-
  • dec<-
Examples
# NOT RUN {
x <- 1:5
inc(x) <- 5
x            # c(6,7,8,9,10)

dec(x) <- 3
x            # c(3,4,5,6,7)
# }
Documentation reproduced from package Hmisc, version 4.0-3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.