rmExpr: [.] Convert expressions in 'ggplot2' object labels to strings

View source: R/rmExpr.R

rmExprR Documentation

[.] Convert expressions in ggplot2 object labels to strings

Description

Convert expressions in ggplot object labels to strings, to enable them to be plotted with ggplotly.

Usage

rmExpr(p = ggplot2::last_plot())

Arguments

p

ggplot2 object

Value

'ggplot2' object

Author(s)

Vilmantas Gegzna

See Also

Other spHelper plots: check_palette(), layer_spRangeMean(), plot_colors(), plot_hyPalette(), plot_spCompare(), plot_spDiff(), plot_spDistribution(), qplot_confusion(), qplot_crosstab(), qplot_infoDim(), qplot_kAmp(), qplot_kSp(), qplot_prediction(), qplot_spRangeCenter(), qplot_spRangeMedian(), qplot_spStat(), qplot_spc(), rm_stripes(), stat_chull()

Other spHelper utilities: IQR_outliers(), expr2text(), mad_outliers(), sd_outliers(), subt(), unGroup(), uncall()

Examples



## Not run: 
data(flu, package = "hyperSpec")

qplotspc(flu)
ggplotly()

rmExpr()
ggplotly()

#--------------------------------
p1 <- qplot_sp(Loadings2)
p1$labels

p2 <- rmExpr(p1)
p2$labels

ggplotly(p1)
ggplotly(p2)

#----------------------------------
qplotspc(aggregate(chondro, chondro$clusters, mean_pm_sd),
mapping = aes(x = .wavelength,
              y = spc,
              colour = clusters)) +
    facet_grid(clusters ~ .) + ggtitle("Spectra of Chondrocytes")

 rmExpr()
 ggplotly()


## End(Not run)


GegznaV/spHelper documentation built on April 16, 2023, 1:42 p.m.