Skip to content

Commit a83e8db

Browse files
Fix R-devel change about attributes handling (#590)
* init * news, desc * rename index * double brackets
1 parent 0136cff commit a83e8db

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: report
22
Type: Package
33
Title: Automated Reporting of Results and Statistical Models
4-
Version: 0.6.2
4+
Version: 0.6.2.1
55
Authors@R:
66
c(person(given = "Dominique",
77
family = "Makowski",

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# report (development version)
2+
3+
Bug fixes
4+
5+
* Patch for change in `attr()` in R-devel (#590).
6+
17
# report 0.6.2
28

39
Bug fixes

R/report.lm.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,12 @@ report_table.lm <- function(x, include_effectsize = TRUE, ...) {
210210
...
211211
)
212212
if (!is.null(effsize)) {
213-
attr(out, paste0(names(attributes(effsize)$ci))) <- attributes(effsize)$ci
213+
new_attrs <- attributes(effsize)$ci
214+
for (idx in seq_along(new_attrs)) {
215+
if (!is.na(names(new_attrs)[idx])) {
216+
attr(out, names(new_attrs)[idx]) <- new_attrs[[idx]]
217+
}
218+
}
214219
}
215220
# Add attributes from params table
216221
for (att in c(

0 commit comments

Comments
 (0)