Skip to content

Commit

Permalink
Fix scallop example vignette (#65)
Browse files Browse the repository at this point in the history
* test next zone_summary function call in vignette

* comment out most of zone_summary for testing

* restore rbuildignore

* add data loading in zone_summary

* comment out all lines except dat and spat setup

* keep only dat

* comment out all code again

* add data_pull to zone_summary

* get dataset in zone_summary

* add parse_data_name to zone_summary

* remove @md in documentation of zone_summary

* move documentation in zone_summary

* change $ to [[]] in parse_data_name

* restore parse_data_name and comment out second part of problem chunk in scallop-example vignette

* remove rlang::caller_env from parse_data_name

* add rlang::caller_env back to parse_data_name

* comment out parse_data_name in zone_summary

* add outlier_table to zone_summary just to check if it will build without error

* keep parse_data_name commented out, but try adding spatout data in zone_summary

* check parse_data_name for spat in zone_summary

* comment out parse_data_name code

* testing parse_data_name again

* remove out but keep parse_data_name

* restore parse_data_name and test if error occurs on following chunk in vignette

* restore zone_summary

* add summary table

* add percent check back in zone_summary

* add conf check and merge spat to zone_summary function

* had to comment out code at the end of zone_summary

* add base_map code back in zone_summary

* add breaks and z_plot function to zone_summary

* needed to add full if statement

* comment out multiplot code

* add group_zone function in zone_summary

* add code after group zone function in zone_summary

* add code in else statement of multiplot in zone_summary

* add rest of multiplot ifelse statement in zone_summary

* keep plotly code and comment our save plot

* try using an intermediate var for z_plot in esle statement

* try adding only ggplotly to else statement

* comment out plotly stuff for testing

* uncomment binned assignement in z_plot_fun in zone_summary

* comment out scale for ggplot in z_plot_fun in zone_summary

* test rest of zone_summary function

* change color scale for zone_summary to always plot continuous viridis color gradient
  • Loading branch information
Paul-Carvalho authored Apr 24, 2024
1 parent 267b58b commit 00f58e1
Show file tree
Hide file tree
Showing 3 changed files with 241 additions and 271 deletions.
44 changes: 22 additions & 22 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -935,37 +935,37 @@ parse_data_name <- function(dat, type, project) {


if (shiny::isRunning()) {

p_set <- get_proj_settings(project)
dat <- p_set$tables[[type]]
} else {

} else {

if (!is.character(dat)) {

if (type == "main") {
dat <- deparse(substitute(dat, rlang::caller_env()))

dat <- deparse(substitute(dat, rlang::caller_env()))

} else if (type == "aux") {
dat <- deparse(substitute(aux, rlang::caller_env()))

dat <- deparse(substitute(aux, rlang::caller_env()))

} else if (type == "grid") {
dat <- deparse(substitute(grid, rlang::caller_env()))

dat <- deparse(substitute(grid, rlang::caller_env()))

} else if (type == "port") {
dat <- deparse(substitute(port, rlang::caller_env()))

dat <- deparse(substitute(port, rlang::caller_env()))

} else if (type == "spat") {
dat <- deparse(substitute(spat, rlang::caller_env()))

dat <- deparse(substitute(spat, rlang::caller_env()))

} else if (type == "outsample") {
dat <- deparse(substitute(outsample, rlang::caller_env()))

dat <- deparse(substitute(outsample, rlang::caller_env()))
}
}
}
Expand Down
Loading

0 comments on commit 00f58e1

Please sign in to comment.