|
1 | 1 | #' Interactively set and see the result of different priors |
2 | 2 | #' |
3 | 3 | #' @param spatial_data Spatial data (must be SpatialPoints or SpatialPointsDataFrame) |
4 | | -#' @param measurement_data Measurement data (data.frame, SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements) |
| 4 | +#' @param measurement_data Measurement data (SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements) |
5 | 5 | #' @param time_variable Time variable name in measurement_data |
6 | 6 | #' @param mesh INLA/fmesher mesh |
7 | 7 | #' @param data_distribution Data distribution, Poisson or Gaussian |
@@ -65,7 +65,7 @@ model_builder_shiny <- function(spatial_data, |
65 | 65 | citation_control_group <- "Prior explanation text modified from https://www.paulamoraga.com/book-geospatial/sec-geostatisticaldataexamplest.html" |
66 | 66 |
|
67 | 67 | initial_equation_val <- "formula <- model_var ~ 0 + Intercept(1)" |
68 | | - features <- names(measurement_data) |
| 68 | + features <- names(measurement_data@data[base::sapply(measurement_data@data, is.numeric) | base::sapply(measurement_data@data, is.logical)]) |
69 | 69 | if (is.null(features)) { |
70 | 70 | stop("We require the columns of measurement_data to have the names of the features to use in the model.") |
71 | 71 | } |
@@ -697,7 +697,7 @@ model_builder_shiny <- function(spatial_data, |
697 | 697 | #' Interactively set and see the result of different priors |
698 | 698 | #' |
699 | 699 | #' @param spatial_data Spatial data |
700 | | -#' @param measurement_data Measurement data (data.frame, SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements) |
| 700 | +#' @param measurement_data Measurement data (SpatialPointsDataFrame, SpatialPolygonsDataFrame with a named time column and at least 1 named feature column with measurements) |
701 | 701 | #' @param time_variable Time variable name in measurement_data |
702 | 702 | #' @param mesh INLA/fmesher mesh |
703 | 703 | #' @param log_folder Folder to write logs to (character) |
|
0 commit comments