  Observations of comet C/2016 R2 (PanSTARRS) have revealed exceptionally
bright emission bands of N$_2^+$, the strongest ever observed in a comet
spectrum. Alternatively, it appears to be poor in CN compared to other comets,
and remarkably depleted in H$_2$O. Here we quantify the N$_2$ production rate
from N$_2^+$ emission lines using the Haser model. We derived effective parent
and daughter scalelengths for N2 producing N2+. This is the first direct
measurement of such parameters. Using a revised fluorescence efficiency for
N2+, the resulting production rate of molecular nitrogen is inferred to be
Q(N$_2$) ~ 1 $\times 10^{28}$ molecules.s-1 on average for 11, 12, and 13 Feb.
2018, the highest for any known comet. Based on a CO production rate of Q(CO) ~
1.1 $\times 10^{29}$ molecules.s-1, we find Q(N$-2$)/Q(CO)~0.09, which is
consistent with the N$_2^+$/CO$^+$ ratio derived from the observed intensities
of N$_2^+$ and CO$^+$ emission lines. We also measure significant variations in
this production rate between our three observing nights, with Q(N$_2$) varying
by plus or minus 20% according to the average value
