Learn R Programming

SciencesPo (version 1.02.12)

around: Find the Values Around a Particular Value

Description

Find the location of values around a specified value

Usage

around(x, value)

Arguments

x
A vector.
value
Specified value

Value

  • lo The maximum value of x that is less than or equal to the value parameter.

    hi The minimum value of x that is greater than or equal to the value parameter.

encoding

UTF-8

Examples

Run this code
set.seed(123)
x = rnorm(25, 5, 10)
value = 9
around(x, value)

Run the code above in your browser using DataLab