P(t) = I^2(t)*R
<P(t)> = <I^2(t)>*R where < > denotes average over time.
For dc current I(t)=I0, <I^2(t)> = I0.
For ac sinusoidal, <I^2(t)> = Irms = Ipeak/sqrt(2)
For any general signal nonsinudsoial or otherwise, <I^2(t)> = Irms (definition of rms).
Irms determines heating and plays the same role as I0 does for dc
Aside - If the frequency becomes high and/or conductor is large, skin effect may play a role to increase the effective resistance.