Hmisc (version 4.0-3)

inc-dec: Increment and Decrement

Description

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

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

Usage

inc(x) <- value

dec(x) <- value

Arguments

x

object to be incremented or decremented

value

value by which x will be modified

Examples

Run this code
# 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)
# }

Run the code above in your browser using DataLab