I'm building customized package using tidyCDISC (that utilize this IDEAFilter)
when I run that app in local. it returns above warning message.
and eventually... I found it's from this IDEAFilter's code. (not tidyCDISC) 😮
below is from shiny_data_filter.R line 247 ~ 253
reactive({
filter_log("recalculating filtered data", verbose = verbose)
structure(
d <- filter_returns[[utils::tail(filters(), 1)]]$data(),
code = code(),
class = c("shinyDataFilter_df", class(d)))
})
warning message shows that
structure(NULL, *) is deprecated... so use structure(list(), *) instead.
which means, if d is NULL, it will use deprecated code, and produce this warning message.
so I changed code as below (only related to d)
to replace NULL to list() using ifelse
reactive({
filter_log("recalculating filtered data", verbose = verbose)
structure(
d <- ifelse(
is.null(filter_returns[[utils::tail(filters(), 1)]]$data()), # previous d
list(), # if d is NULL use list()
filter_returns[[utils::tail(filters(), 1)]]$data() # d is not null, so use previous d
),
code = code(),
class = c("shinyDataFilter_df", class(d)))
})
and I checked message doesn't show anymore.
I made PR with this.
please check this and let me know if you have any issues or questions.
Hi. thanks for nice code. 😎
I'm building customized package using
tidyCDISC
(that utilize thisIDEAFilter
)when I run that app in local. it returns above warning message.
and eventually... I found it's from this
IDEAFilter
's code. (nottidyCDISC
) 😮below is from shiny_data_filter.R line 247 ~ 253
warning message shows that
structure(NULL, *) is deprecated... so use structure(list(), *) instead.
which means, if d is NULL, it will use deprecated code, and produce this warning message.
so I changed code as below (only related to d) to replace NULL to list() using
ifelse
and I checked message doesn't show anymore.
I made PR with this.
please check this and let me know if you have any issues or questions.
Thanks in advance
Kim