On Tue, 6 Oct 2020, Sven Schreiber wrote:
> Well, I thought that it'd be nice if the description of
nelem()
> mentioned the fact that this function is the preferred way of inferring
> the "size" of an object, including scalars. In fact, we could make
> nelem() functionally equivalent to nobs() for series.
Interesting idea; although for value added perhaps some differentiation
from nobs() might also be good. Say, working not over the current sample
but over the entire range (or something else, just a thought).
If the trend is to generalize nelem(), could it also become an alias for
strlen()? Or again, some variant thereof to provide value added?
Or maybe, for the sake of keeping the namespace as small as possible, we
could deprecate nobs() and strlen() in favour of nelem() and remove them
in due course.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------