Given an object that describes a model or a dataset, it returns the number of samples.
nSamples(x)
x
an object that describes a dataset or a model.
the number of samples.