If called with a second input argument (dim), size returns the number of observations if dim==1 or the number of variables if dim==2. Without this second argument, size returns the number of observations and the number of variables.
dfa744fcb3