[R-pkg-team] Bug#1061828: r-cran-plotly: Can't create any plots
Przemysław Kopa
prz.kopa at gmail.com
Tue Jan 30 19:58:58 GMT 2024
I've done some investigation. If you uninstall r-cran-plotly and then
install plotly directly from CRAN (same version), then the plot from the
example renders correctly:
$ sudo apt remove r-cran-plotly
> install.packages(pkgs =
"https://cran.r-project.org/package=plotly&version=4.10.1", repos = NULL)
> library(plotly)
> plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length) # works fine!
I've run the above example firstly with r-cran-plotly installed and then
with the CRAN version installed to see the differences in resulting
files. The only files that differ are 'index.html', 'plotly-latest.min.js'
and 'typedarray.min.js'.
$ diff -qr plotly_packaged plotly_cran
Files plotly_packaged/index.html and plotly_cran/index.html differ
Files plotly_packaged/lib/plotly-main-2.11.1/plotly-latest.min.js and
plotly_cran/lib/plotly-main-2.11.1/plotly-latest.min.js differ
Files plotly_packaged/lib/typedarray-0.1/typedarray.min.js and
plotly_cran/lib/typedarray-0.1/typedarray.min.js differ
HTML files are essentially identical, the only difference between them
lays in object id attributes, which are generated randomly. On the other
hand, plotly and typedarray js files are completely different and CRAN
versions appear to be newer, for example:
$ head -n 6 plotly_cran/lib/plotly-main-2.11.1/plotly-latest.min.js
/**
* plotly.js v2.11.1
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
$ head -n 6 plotly_packaged/lib/plotly-main-2.11.1/plotly-latest.min.js
/**
* plotly.js v1.31.2
* Copyright 2012-2017, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
Therefore, I think there must be a problem with 'plotly-latest.min.js'
and 'typedarray.min.js' that are packaged in r-cran-plotly. Hope this
helps!
Kind regards,
Przemyslaw
More information about the R-pkg-team
mailing list