R/get.ipc.R

get.ipc <-
function(n, mag=NULL){ 
if(mag < 1) stop("The district magnitude must be at least 1")
.ipc <- ((2 * n) / (mag) - 1)/100
  return(.ipc)
}

Try the SciencePo package in your browser

Any scripts or data that you put into this service are public.

SciencePo documentation built on May 2, 2019, 5:53 p.m.