# Example data frame
df <- data.frame(
id = 1:5,
value = c(10, 20, 30, 40, 50)
)
# Update rows where id > 3
updated_df <- update_record(df, column = value, where = id > 3, set_to = 100)
print(updated_df)
# Using column as a string
updated_df <- update_record(df, column = "value", where = id == 2, set_to = 99)
print(updated_df)
Run the code above in your browser using DataLab