matsindf
Cite all releases with doi 10.5281/zenodo.5475443, which always resolves to the latest release.
matsindf_apply()
where a a data frame
column with some named elements and some unnamed elements led to the
unnamed elements yielding 0
or NULL
results
after FUN
was applied. The fix was to unname()
everything before calling purrr::transpose()
.df_to_msg()
to make
error reports easier to read.matrix.class
argument. It will be removed
soon.matrix.class
argument to
matrix_class
.1
strings in the ...
argument of matsindf_apply()
now extends to default
arguments of FUN
.matsindf_apply()
enables better error
and warning messages in many places.matsindf_apply()
. It was a complete
mess! Hopefully, it is now easier to debug and maintain.
matsindf_apply()
now correctly returns a list when
lists are provided in the ...
argument. Previously, it
incorrectly returned a data frame.matsindf_apply()
now correctly disallows any unused
arguments supplied in its ...
argument. Previously, some
unused argument situations were not flagged as errors, despite
documentation saying they would be.matsindf_apply()
now gives warning messages when an
argument to FUN
cannot be found in any of ...
,
.dat
, or defaults to FUN
. This condition may
be OK, and the caller can suppress the warning by passing
.warn_missing_FUN_args = FALSE
to
matsindf_apply()
.matsindf_apply()
now gives more descriptive error
messages.matsindf_apply()
now allows more options for incoming
data.matsindf_apply()
now tries really hard to deal with
empty inputs, falling back to returning the original input unmodified
(except possibly wrapped in a list()
) when the input has
zero rows (in the case of a data frame) or zero length (in the case of
lists).matsindf_apply()
.
matrix
and
Matrix
objects, thereby enabling use of sparse matrices.
Use matsbyname::Matrix()
to create sparse matrices as
appropriate.mat_to_rowcolval()
now accepts Matrix
objects in the .matrix
argument.rowcolval_to_mat()
gains a matrix.class
argument that specifies whether a matrix
or a
Matrix
should be created.Matrix
objects.
verify_cols_missing()
from
the Recca
package to matsindf
. Those tests
didn’t belong in Recca
.expand_to_tidy()
.matrix_cols()
tells which columns contain
matrices, either in the any()
sense or in the
all()
sense.matsindf_apply()
primer vignette discusses how
to handle heterogeneous arguments types to FUN
.matsindf_apply()
when using string
arguments to FUN
.
matsindf_apply()
where the
list returned from Map()
had names on each individual item.
The names on individual items caused problemsmatsbyname
function with both a named and an unnamed list, because those functions
expect the same name structure. The solution was to remove the names
from each individual item after calling Map()
and before
calling purrr::transpose()
.matsindf
for principal components analysis (PCA).testthat
v3.RCLabels
package out of
matsbyname
.rowtypes
and coltypes
arguments now have
special defaults to enable calling collapse_to_matrices()
without specifying those arguments.collapse_to_matrices()
to check
whether NULL
values for rowtype
and
coltype
arguments are handled correctly.df_to_msg()
can assist with error
messages. df_to_msg()
was moved from the
SEAPSUTWorkflow
package, because it is generally
useful.matsindf.Rmd
vignette now uses the keep
argument on matsbyname::hatize_byname()
.matsindf.Rmd
vignette. Needed to
supply the keep
argument on
hatize_byname()
.matsindf_apply()
.matsindf_apply()
for functions
similar in form to those in Recca
.context()
calls at top of test files.NULL
.DF
in
matsindf_apply()
.dplyr
, all calls to
dplyr::group_by()
now use .add
argument
instead of add
argument.dplyr
1.0.0. Several
tests in matsindf
assumed that some dplyr
functions returned data.frame
s. Now that many
dplyr
functions return tibble
s, the
matsindf
tests needed to be rewritten. All tests pass
vs. dplyr
0.8.5. One warning remains when testing
matsindf
with dplyr
1.0.0, namely that the
add
argument of group_buy()
is deprecated.
When dplyr
1.0.0 is released to CRAN, I will convert
add
to .add
, per the dplyr
authors’ recommendation.data.frame()
has stringsAsFactors = TRUE
by
default. In R4.0.0, stringsAsFactors = FALSE
will be the
default. In one test (“small example works as expected”), I was relying
on the current behavior (stringsAsFactors = TRUE
). That
reliance has been removed so that this test will also pass under
R4.0.0.matrix
objects now inherit from both matrix
and
array
. Thus, code should no longer assume that
class(A)
returns an object of length 1 when A
is a matrix
. So, I eliminated all instances of
class(A) == "matrix"
in if
statements in favor
of inherits(A, "matrix")
. See
https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html
for more details.group_by_everything_except()
to use a new
helper function everything_except()
group_by_everything_except()
\dontrun{}
–> \donttest{}
in Roxygen
examplesmatsindf
functions.:=
and .data
at a high
level.magrittr
pipe at a high level.pkgdown
documentation.rowtypes
and
coltypes
arguments to expand_to_tidy
and
collapse_to_matrices
functions are no longer
NULL
. Rather, they are “rowtypes
” and
“coltypes
”.matsindf_apply
primer to include sections
on using matsindf_apply
with a data frame and
programming.index_column
that ratios both numbers and
matrices relative to an initial time.expand_to_tidy
now accepts a named list of matrices as
input.matsindf_apply
now obtains named arguments from
.DF
when a name in .DF
matches a name of an
argument to FUN
. This behavior is overridden by supplying a
string argument in ...
of matsindf_apply
.matsindf_apply
now accepts a list as input when
arguments are all strings.matsindf_apply
function.matsindf_apply
.matsbyname
package.