Skip to content

Commit c8af62d

Browse files
committed
Revert "Removing the non-numeric or non-logical variables from the model features options"
This reverts commit 595a86b.
1 parent c5f64d3 commit c8af62d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/shiny_modelbuilder.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' Interactively set and see the result of different priors
22
#'
33
#' @param spatial_data Spatial data (must be SpatialPoints or SpatialPointsDataFrame)
4-
#' @param measurement_data Measurement data (SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements)
4+
#' @param measurement_data Measurement data (data.frame, SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements)
55
#' @param time_variable Time variable name in measurement_data
66
#' @param mesh INLA/fmesher mesh
77
#' @param data_distribution Data distribution, Poisson or Gaussian
@@ -65,7 +65,7 @@ model_builder_shiny <- function(spatial_data,
6565
citation_control_group <- "Prior explanation text modified from https://www.paulamoraga.com/book-geospatial/sec-geostatisticaldataexamplest.html"
6666

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

0 commit comments

Comments
 (0)