8000 Solved the LaTeX2exp error. Closes #2027 by moutikabdessabour · Pull Request #2030 · plotly/plotly.R · GitHub
[go: up one dir, main page]

Skip to content

Solved the LaTeX2exp error. Closes #2027 #2030

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

Merged
merged 13 commits into from
Nov 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Trying to solve the issue with the checks.
  • Loading branch information
moutikabdessabour committed Sep 28, 2021
commit 71df890108e563837aa3780eb2dc2958e5e7dd9a
5 changes: 4 additions & 1 deletion R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -1301,25 +1301,28 @@ bold <- function(x) paste("<b>", x, "</b>")
italic <- function(x) paste("<i>", x, "</i>")

# generic S3 method to allow for class specific implementations
#' @export
uniq <- function(x){
UseMethod("uniq", x)
}

# if a vector that has one unique value (ignoring missings), return that value
#' @export
uniq.default <- function(x) {
u <- unique(x)
if (identical(u, NA) || length(u) == 0) return(u)
u <- u[!is.na(u)]
if (length(u) == 1) u else x
}

#' @export
uniq.NULL <- function(x) {
x
}

# if TeX object convert to character first
uniq.TeX <- function(x){
print(uniq(as.character(x)))
uniq(as.character(x))
}

# theme(strip.background) -> plotly.js rect shape
Expand Down
0