Potential functions to add to `chk` (first version of the diagram)
Hello
Here there is a first version of chk diagram. Part of the diagram is based on the book Advanced R.
The existence of objects mentioned in Advanced R that do not currently have a corresponding chk function should not be the sole criterion for deciding which new functions to include in the package. The goal of this issue is to list these objects as sources of potential new chk functions for further discussion.
Both the diagram and the final comments are open to feedback and modifications.
Note: The functions highlighted in pink may be confusing. I marked them this way to remind myself to add some clarifying comments in the documentation.
What is currently not covered?
- The data types
complexandrawdon't have specific functions to check them (but they are mentioned as less frequently used). - Tibbles.
There are no
chk_*andvld_*functions for tibbles. Tibbles are not equal to data frames. They have a different class and can behave as specified in this section of Advanced R
#> $class
#> [1] "tbl_df" "tbl" "data.frame"
- Durations.
There are no
chk_*andvld_*functions for classdifftimes.
"Durations, which represent the amount of time between pairs of
datesordate-times, are stored indifftime.difftimeclass is built on top ofdoubles, and have aunitsattribute that determines how the value should be interpreted"
-
Units attribute Since the
chk_tzfunction checks thetzattribute of thePOSIXctclass, a similarchk_*andvld_*function could be developed to check theunitsattribute of thedifftimeclass. -
Doubledata type scalars There are some scalars for data typedoublethat don't have specific functions to check them:hexadecimal,NaN,Inf,-Inf,Scientific. -
More functions for
data.frameslength()may not be intuitive fordata.frames.
"A data frame has nrow() rows and ncol() columns. The length() of a data frame gives the number of columns."