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

Strange behavior with options(OutDec = ",") #172

Open
a-alexandre opened this issue Jul 9, 2021 · 1 comment
Open

Strange behavior with options(OutDec = ",") #172

a-alexandre opened this issue Jul 9, 2021 · 1 comment

Comments

@a-alexandre
Copy link

Hello,

I have found a strange behavior of esquisse (refusing to launch, or when it does, plot does not render).

I think the issue is because I somtimes use options(OutDec = ',') for printing reasons in Rmarkdown files.
Not sure that it is a bug.

data1 <- structure(list(X = c("2019", "2019", "2019", "2019", "2019", 
"2019", "2019", "2019", "2019", "2020", "2020", "2020", "2020", 
"2020", "2020", "2020", "2020", "2020"), pour_facet = c("1", 
"1", "1", "2", "2", "2", "3", "3", "3", "1", "1", "1", "2", "2", 
"2", "3", "3", "3"), fill_var = structure(c(1L, 2L, 3L, 1L, 2L, 
3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L), .Label = c("rac", 
"rc", "ro"), class = c("ordered", "factor")), Y = c(1320902.16, 
2113334.39, 888476.78, 999199.29, 1341383.34, 474006.48, 2896349.94, 
3975109.4, 1531865.29, 25356.6500000004, 7652747.56, 2127287.88, 
1203614.26, 1931651.82, 709611.38, 1449320.96, 1671894.36, 568070.61
)), row.names = c(NA, -18L), class = c("tbl_df", "tbl", "data.frame"
))

options(OutDec = ",")

esquisse::esquisser(data1)
#> Error: .onLoad a échoué dans loadNamespace() pour 'shiny', détails :
#>   appel : NULL
#>   erreur : spécification de version incorrecte '1,5'

Created on 2021-07-09 by the reprex package (v0.3.0)

@pvictor
Copy link
Member

pvictor commented Jan 5, 2022

Hello,

This error is caused by numeric_version(1.5) when loading dependencies and checking version number with something like :

loadNamespace("shiny", versionCheck = list(op = ">=", version = numeric_version(1.5)))

at least from what I understand ^^

A workaround is to explicitly load shiny package before calling esquisse::esquisser(), the error will still appear but esquise should launch and work.

data1 <- structure(list(X = c("2019", "2019", "2019", "2019", "2019", 
"2019", "2019", "2019", "2019", "2020", "2020", "2020", "2020", 
"2020", "2020", "2020", "2020", "2020"), pour_facet = c("1", 
"1", "1", "2", "2", "2", "3", "3", "3", "1", "1", "1", "2", "2", 
"2", "3", "3", "3"), fill_var = structure(c(1L, 2L, 3L, 1L, 2L, 
3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L), .Label = c("rac", 
"rc", "ro"), class = c("ordered", "factor")), Y = c(1320902.16, 
2113334.39, 888476.78, 999199.29, 1341383.34, 474006.48, 2896349.94, 
3975109.4, 1531865.29, 25356.6500000004, 7652747.56, 2127287.88, 
1203614.26, 1931651.82, 709611.38, 1449320.96, 1671894.36, 568070.61
)), row.names = c(NA, -18L), class = c("tbl_df", "tbl", "data.frame"
))

options(OutDec = ",")
library(shiny) # <- explicitly load shiny
esquisse::esquisser(data1)

Victor

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

2 participants