Calculate the root-mean-square (RMS) of a dataset

Calculate the root-mean-square of a dataset. Eg. given the voltages over time of an alternating current, calculate the RMS voltage.