scount()
,sadd_count()
,tally()
andadd_tally()
are now based oncollapse::fcount()
with some changes to better match the arguments and behavior of the corresponding{dplyr} functions. However, much work was needed to align these speedy functions to the behavior of their tidy counterparts, in part because the tidy functions sort of the frequencies columns and thecollapse::fcount()
function that is used sorts on the categories labels... and it does not sort on it by default.
-
The alternate assignments
%<-%
and%->%
do not evaluatecollect()
in atry()
construct, silently swallowing any error any more. Acollect.default()
method is defined to make sure to return intact any object that cannot be collected without error. -
Default
print()
methods are restored for data.frame and data.table objects. -
Since {dplyr} functions now return the same object as it is receiving (tibble -> tibble, but data.frame -> data.frame and data.table -> data.table), the use of
lazy_dt()
is mandatory to benefit of {dtplyr} translation into {data.table} statements and its speed performance, examples are adapted accordingly. -
Bug correction in
sunite()
, the argumentcol=
was setting the name of the column always to "col".
-
is_dtx()
and similar functions now also detect spec_tbl_df objects from {readr} and groupedData of {datasets} are true data frames, even withstrict = TRUE
. Consequently,default_dtx()
converts also these objects. -
as_dtx()
and similar functions get labels and units from the corresponding attributes of groupedData objects and apply them to each vector in the resulting data frame.
-
The tidy functions are reworked to use the original function name, not the one with a "t" prefix.
-
The functions that list family functions now start with
list_
, likelist_tidy_functions()
,list_speedy_functions()
orlist_fstat_functions()
. -
dtx_rows()
and other similar functions are added to avoid usingdtx(tribble(...))
.
-
Addition of "tidy" 't' functions and "speedy" 's' functions. The tidy functions are mostly renamed versions of {dplyr} or {tidyr} functions, while the speedy functions have a similar interface but are from {collapse} or {data.table} for a big part of them. Arguments are homogenized and sometimes reduced to restrict to features that are compatibles in the two groups.
-
The function
n()
is not working inssummarise()
. Usefn(var)
instead, and you can also use it intsummarise()
. -
Addition of "fast" functions from {collapse} +
fn()
andfna()
. -
The
%xf%
operators wherex
can be-
,/
, etc. for a more readable alternative toTRA=
in the fast functions. -
More robust strict
is_dt_()
functions for grouped data.
- In
dtf()
, creating a column with name.rowname
(or the value ingetOption("SciViews.dtx.rownames")
) will transform it into the row names of the resulting data.frame object.
-
When
group_by()
is used,collect()
creates a grouped_df. This special object is now recognized and converted byas_dtx()
and co into ungrouped data frame. -
collect_dtx()
/dtf()
/dtt()
/dtbl()
added to force the right data frame class (withcollect_dtbl()
giving the same result ascollect()
, except that grouped data are also ungrouped).
-
The most important functions are added to manage data frames (being data.frame, data.table, or tibble tbl_df objects) in a more coherent way, with the possibility to define one's preferred object.
-
The
dtx()
,as_dtx()
anddefault_dtx()
functions can be used in packages to automatically convert data frames into the preferred object without forcing it to the user. -
The alternate assignment operators
%<-%
and%->%
collect result from {dtplyr} (or {dbplyr}) and convert it into the preferred data frame object. Also, the multiple or deconstructing assignment implemented in {zeallot} is also usable here in addition to the conversion into the preferred data frame. -
Row names were not printed when a data.frame is using {pillar}. It is now a column named and with class <rownames>.
-
as_matrix()
applied to a tbl_df object did not honor.rownames
. Corrected.
- This is the first version of the package with main functions to manage data.frame/data.table/tibble objects.