hafen / trelliscopejs

TrelliscopeJS R Package
https://hafen.github.io/trelliscopejs
Other
262 stars 36 forks source link

facet_trelliscope() fails if path is not set #110

Open s-u opened 3 years ago

s-u commented 3 years ago

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.

tinyheero commented 1 year ago

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.

JMLuther commented 1 year ago

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

lachlansimpson commented 7 months ago

Still seen in version 0.2.6

hafen commented 6 months ago

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.

lachlansimpson commented 6 months ago

@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?

hafen commented 6 months ago

@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.

sleeubc commented 1 month ago

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

hafen commented 1 month ago

Awesome thanks for reporting!