Open IndrajeetPatil opened 2 years ago
If someone implements this, all of the assignments should be stacked like:
model_parameters.a <-
model_parameters.b <-
model_parameteters.default
But, IINM, model_parameters.b
won't appear in NAMESPACE
if we do it this way.
We'll need to do something like this if both of them are to appear in NAMESPACE
:
#' @export
model_parameters.a <- model_parameteters.default
#' @export
model_parameters.b <- model_parameteters.default
But, IINM,
model_parameters.b
won't appear inNAMESPACE
if we do it this way.
Yes, I can confirm that this is the case.
Just tried it with the code below, and the middle ones in the chain disappear from NAMESPACE
:
Hmmm, there's a way, let me see what I did before
Edit: ah nope, I was misremembering.
Okay. Thanks for checking!
That would have indeed been cleaner if it were supported. Is it that roxygen2 can't handle this, or that R itself doesn't support it?
Just wondering if we can make a feature request.
But, regardless, at least for now we can just do the following:
#' @export
model_parameters.a <- model_parameteters.default
#' @export
model_parameters.b <- model_parameteters.default
It's a Roxygen limitation
In a PR, I the added export S3 methods for model_parameters()
generic:
Just as FYI reference, here is clumsy code I used:
missing classes
x <- broom_supported[!broom_supported %in% easystats_supported]
and to construct this
' @export
model_parameters.CLASS <- model_parameters.default
use clumsy code
cat(vapply(x, function(x) { paste0("#' @export\n", "model_parameters.",x, " <- model_parameters.default\n\n")}, character(length = 1), USE.NAMES=F)
)
ALSO, I found this *without* function a little easier to decipher:
"%w/o%" <- function(x, y) x[!x %in% y] #-- x without y x <- broom_supported %w/o% easystats_supported
A lot of the objects listed below are actually supported in parameters, but developers who will be comparing it with broom will think they aren't because there are no exported methods in
NAMESPACE
.Created on 2022-07-17 by the reprex package (v2.0.1)
This is because most of them are supported by the default method:
Created on 2022-07-17 by the reprex package (v2.0.1)
I think we just need to do something like-
This is low priority, and probably easy enough to be handled by newcomers.