Correction to: Nature Materials, published online 4 November 2019.

In the version of this Letter originally published, the Supplementary Information incorrectly referred to Fe0.35NbS2 crystals throughout; it should have referred to Fe0.33NbS2 crystals. Also, the following sentence should not have been included in the Supplementary Information so has been deleted: ‘The switching is of approximately the same amplitude as the device shown in the main text.’ Finally, in the caption of Supplementary Fig. 8, the current density was incorrectly given as 8.8×104A/cm2; it should have been 7.1×104A/cm2. The Supplementary Information has now been replaced to include these changes.