Skip to content

Commit

Permalink
Revert dontruns
Browse files Browse the repository at this point in the history
  • Loading branch information
zsteinmetz committed Sep 3, 2023
1 parent 86f9445 commit 4be76b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions R/def_features.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
#' collapsed for the features.
#'
#' @examples
#' \dontrun{
#' tiny_map <- read_extdata("CA_tiny_map.zip") |> read_any()
#' identified_map <- def_features(tiny_map, tiny_map$metadata$x == 0)
#' collapse_spec(identified_map)
#' }
#'
#' @param x an \code{OpenSpecy} object
#' @param features a logical vector or character vector describing which of the
#' spectra are of features (\code{TRUE}) and which are not (\code{FALSE}).
Expand Down
14 changes: 6 additions & 8 deletions R/interactive_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#' spectra from the \code{OpenSpecy} object(s).
#'
#' @examples
#' \dontrun{
#' data("raman_hdpe")
#' tiny_map <- read_extdata("CA_tiny_map.zip") |> read_zip()
#' plotly_spec(raman_hdpe)
Expand All @@ -50,8 +49,7 @@
#'
#' sample_spec(tiny_map, size = 12) |>
#' interactive_plot(select = 2, x2 = raman_hdpe)
#' }
#'
#'
#' @author
#' Win Cowger, Zacharias Steinmetz
#'
Expand Down Expand Up @@ -86,18 +84,18 @@ plotly_spec.OpenSpecy <- function(x, x2 = NULL,
melt(id.vars = "wavenumber", variable.name = "id", value.name = "intensity")

p <- plot_ly(dt, type = "scatter", mode = "lines") |>
add_trace(x = ~wavenumber,
add_trace(x = ~wavenumber,
y = ~intensity,
split = ~id,
split = ~id,
line = line,
name = "x1",
name = "x1",
showlegend = F) |>
layout(xaxis = list(title = "wavenumber [cm<sup>-1</sup>]",
autorange = "reversed"),
yaxis = list(title = "intensity [-]"),
plot_bgcolor = plot_bgcolor,
paper_bgcolor = paper_bgcolor,
legend = list(orientation = 'h', y = 1.1),
legend = list(orientation = 'h', y = 1.1),
font = font)

# Add dummy trace for Your Spectra
Expand Down Expand Up @@ -167,7 +165,7 @@ heatmap_spec.OpenSpecy <- function(x,

if(all(is.na(plot_z)))
plot_z = rep(-88, length.out = length(plot_z))

p <- plot_ly(...) |>
add_trace(x = x$metadata$x, y = x$metadata$y, z = if(!is.numeric(plot_z)){as.numeric(as.factor(plot_z))} else{plot_z},
colorscale = colorscale, type = "heatmap", hoverinfo = 'text',
Expand Down
4 changes: 1 addition & 3 deletions R/read_multi.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
#' All \code{read_*()} functions return \code{OpenSpecy} objects
#'
#' @examples
#' \dontrun{
#' read_extdata("raman_hdpe.csv") |> read_any()
#' read_extdata("ftir_ldpe_soil.asp") |> read_any()
#' read_extdata("testdata_zipped.zip") |> read_zip()
#' read_extdata("CA_tiny_map.zip") |> read_zip()
#' }
#'
#'
#' @author
#' Zacharias Steinmetz, Win Cowger
#'
Expand Down

0 comments on commit 4be76b8

Please sign in to comment.