Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies problem when saving datatable objects #1160

Open
simopernice opened this issue Dec 12, 2024 · 0 comments
Open

Dependencies problem when saving datatable objects #1160

simopernice opened this issue Dec 12, 2024 · 0 comments

Comments

@simopernice
Copy link

If I run the following simple code:

library(DT)
library(htmlwidgets)
data <- iris
datatable_obj = datatable(data, options = list(pageLength = 5)) %>%
formatStyle(
'Species',
target = 'row',
backgroundColor = styleEqual(
unique(data$Species),
c('lightblue', 'lightgreen', 'lightpink')
)
)
datatable_obj$dependencies
save(object = datatable_obj,file = "datatable.RData")

Then I pass and open the RDS object from another device, it seems that absolute path dependencies of the library DT of the first device are saved in datatable_obj (datatable_obj$dependencies), which not correspond to the absolute path of the DT library of the second device.

We suggest to using parametric and relative path to solve this, in this manner users do not have to update the path every time such objects are opened from different devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant