I've always wondered if there's a command in R that gives you the entire domain of values within a variable.
For example, let's say I have the following data.table:
dt
Household Number_of_children
1 0
2 3
3 3
Is there a command along the lines of summary()
or str()
that would return the list 0, 3
?
I believe summary
and str
only do that when your variable is a character string. I don't know how to do this when your variable is an integer, numeric, etc.