Skip to content

Instantly share code, notes, and snippets.

View egouldo's full-sized avatar

Elliot Gould egouldo

View GitHub Profile
@egouldo
egouldo / calculate_js_payment_reduction.R
Created March 18, 2025 03:01
Calculate jobseeker payment reduction
payment_reduction <-
function(income,
brackets = c(150, 256, 1479, Inf),
rates = c(0, .5, .6, 1)) {
sum(diff(c(0, pmin(income, brackets))) * rates)
}