# Sample data.frame
df <- data.frame(
a = c(1, NA, 3),
b = c(NA, 2, NA),
c = c(3, 2, 1)
)
# Find NA positions
valueCoordinates(df)
# Find positions of value 2
valueCoordinates(df, 2)
# Find positions where values exceed 2
valueCoordinates(df, 2, function(x, y) x > y)
# Find positions of values in range [1,3]
valueCoordinates(df, c(1, 3), function(x, y) x >= y[1] & x <= y[2])
Run the code above in your browser using DataLab