Skip to content

Commit

Permalink
Revert "Removing the non-numeric or non-logical variables from the mo…
Browse files Browse the repository at this point in the history
…del features options"

This reverts commit 595a86b.
  • Loading branch information
aabelean committed Dec 18, 2024
1 parent c5f64d3 commit c8af62d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/shiny_modelbuilder.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Interactively set and see the result of different priors
#'
#' @param spatial_data Spatial data (must be SpatialPoints or SpatialPointsDataFrame)
#' @param measurement_data Measurement data (SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements)
#' @param measurement_data Measurement data (data.frame, SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements)
#' @param time_variable Time variable name in measurement_data
#' @param mesh INLA/fmesher mesh
#' @param data_distribution Data distribution, Poisson or Gaussian
Expand Down Expand Up @@ -65,7 +65,7 @@ model_builder_shiny <- function(spatial_data,
citation_control_group <- "Prior explanation text modified from https://www.paulamoraga.com/book-geospatial/sec-geostatisticaldataexamplest.html"

initial_equation_val <- "formula <- model_var ~ 0 + Intercept(1)"
features <- names(measurement_data@data[base::sapply(measurement_data@data, is.numeric) | base::sapply(measurement_data@data, is.logical)])
features <- names(measurement_data)
if (is.null(features)) {
stop("We require the columns of measurement_data to have the names of the features to use in the model.")
}
Expand Down Expand Up @@ -697,7 +697,7 @@ model_builder_shiny <- function(spatial_data,
#' Interactively set and see the result of different priors
#'
#' @param spatial_data Spatial data
#' @param measurement_data Measurement data (SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements)
#' @param measurement_data Measurement data (data.frame, SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements)
#' @param time_variable Time variable name in measurement_data
#' @param mesh INLA/fmesher mesh
#' @param log_folder Folder to write logs to (character)
Expand Down

0 comments on commit c8af62d

Please sign in to comment.