A number of people have been confused that a resistor current; e.g., I(R1); can’t be accessed in a behavioral source. Normally it is not. Certainly not in standard SPICE programs because only the currents devices modeled as a Thévenin equivalent(V, E, H, L, B with V=…) can be accessed.
In prior art, I made it possible to access because it was useful for a SMPS. But it wasn’t really correct. The current from from the prior time step and could not be used in a .AC analysis. That didn’t matter for a SMPS because the current was usually used to reset a flipflop an only the prior value was actually needed.
Anyway, today QSPICE allows resistor current to be accessed and it’s correct this time.