find line with value

# Sample data frame
df <- data.frame(ID = 1:5, Value = c(10, 15, 8, 12, 18))

# Value to search for
search_value <- 8

# Find the row with the specified value in the 'Value' column
result_row <- df[df$Value == search_value, ]

# Print the result
print(result_row)