trelliscopejs icon indicating copy to clipboard operation
trelliscopejs copied to clipboard

facet_trelliscope() fails if path is not set

Open s-u opened this issue 3 years ago • 8 comments

The default path=NULL in facet_trelliscope() seems to not be handled correctly and breaks in rmarkdown:

Error in if (is_abs_path(orig_path)) { : argument is of length zero
Calls: <Anonymous> ... knit_print.facet_trelliscope -> print.facet_trelliscope -> resolve_app_params

Setting the default to path="." in facet_trelliscope() fixes the issue, but presumably the default should be either changed or the NULL somehow replaced with real path internally.

As an aside the first obvious attempt at fix with path="" fails with

Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection
Calls: <Anonymous> ... print.facet_trelliscope -> write_display_obj -> cat -> file

so it really has to be forced to "." or else facets don't work.

s-u avatar May 07 '21 02:05 s-u

Thanks @s-u for posting this. I can verify that I've also encountered the same issue when trying to use facet_trelliscope in a Rmarkdown report.

tinyheero avatar Oct 06 '22 08:10 tinyheero

A second thanks to @s-u
Adding path="." also fixed my issue when knitting to an html file- was getting an error: "The system cannot find the file specified" image

JMLuther avatar Oct 13 '22 22:10 JMLuther

Still seen in version 0.2.6

lachlansimpson avatar Dec 06 '23 02:12 lachlansimpson

Sorry my attention regarding Trelliscope has been on a new version that you can find here. This package has a new data-frame-centric R interface and an improved UI as well. I'll be focusing updates and improvements there, so I encourage you to check it out.

hafen avatar Dec 19 '23 18:12 hafen

@hafen yes, it took a while to unpick the various repos and CRAN packages, but we got there in the end. Do you have a timeframe for a stable release of the new version?

lachlansimpson avatar Jan 05 '24 00:01 lachlansimpson

@datakid good question the R interface has converged and is solid and I would consider the package to be quite stable. I am holding off on CRAN for a bit while more people start trying it out.

hafen avatar Jan 05 '24 01:01 hafen

It turned out that it was a R problem, not trelliscope or trelliscopejs. plotly had the same problem. https://github.com/plotly/plotly.R/issues/2353

One can fix it by installing the patched version of R. https://cran.r-project.org/bin/windows/base/rpatched.html

sleeubc avatar May 24 '24 01:05 sleeubc

Awesome thanks for reporting!

hafen avatar Jun 10 '24 17:06 hafen