You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✖ d_calc.R:24: @export must be a single line, not 14.
ℹ The first line is "Calculate Cohen's D or Glass's $\Delta$ based on effect size and
sample SD"
ChatGPT helped me diagnose the problem after multiple tries: #` comments in the function, e.g.
d_calc <- function(stat_type, stat, sample_sd, n_t, n_c) {
#' Calculate Cohen's D or Glass's $\Delta$ based on effect size and sample SD
if (stat_type == "d_i_d" || stat_type == "d_i_m" || stat_type == "reg_coef" ||
stat_type == "beta") {
d <- round(stat / sample_sd, digits = 3)
} else if (stat_type == "d") {
#' Directly use the reported change of SDs
Roxygen was treating #` comments as part of the structured text it produces documentation from. I had no idea, and googling this is tricky because # and #` are special characters.
Is an informative error message possible? Maybe a pointer to some materials on commenting conventions and what Roxygen does and does not interpret as meaningful?
I was getting a befuddling
x
when I tried todevtools::build()
on the d_calc function in this package:✖ d_calc.R:24: @export must be a single line, not 14.$\Delta$ based on effect size and
ℹ The first line is "Calculate Cohen's D or Glass's
sample SD"
ChatGPT helped me diagnose the problem after multiple tries: #` comments in the function, e.g.
Roxygen was treating #` comments as part of the structured text it produces documentation from. I had no idea, and googling this is tricky because # and #` are special characters.
Is an informative error message possible? Maybe a pointer to some materials on commenting conventions and what Roxygen does and does not interpret as meaningful?
Related issues:
@export
should include more details in error #1074The text was updated successfully, but these errors were encountered: