.num_samples: Compute the number of samples in an input
Description
This helper function determines the number of samples in the input object.
For a vector, it returns its length. For a matrix or data frame, it returns
the number of rows.
Usage
.num_samples(x)
Value
An integer representing the number of samples (rows) in the input
object.
Arguments
x
An input object (scalar, vector, matrix, or data frame).