# Create raw data
df <- data.frame(Id = 1:20,
RawScore = rep(11:15, 4))
# Increment scores by 2
df$AdjScore <- adjust_raw_scores(df, "RawScore", inc = 2)
# Adjust scores using a function
adjust_raw_scores(df = NULL, raw = list(11:15), inc = function(x) {x^2})
Run the code above in your browser using DataLab