-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmvp-api-targets.R
79 lines (79 loc) · 1.9 KB
/
mvp-api-targets.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# model_validation <- function(covariate_rasters,
# training_data,
# list_of_l0_models,
# inla_mesh_setup){
# create_data_paths(covariate_rasters,
# training_data,
# list_of_l0_models,
# inla_mesh_setup)
# tar_make(
# # the final objects that we care about
# oos_diagnostics
# )
#
# tar_load(
# oos_diagnostics
# )
# }
#
# spatial_prediction <- function(covariate_rasters,
# training_data,
# list_of_l0_models,
# inla_mesh_setup){
# create_data_paths(covariate_rasters,
# training_data,
# list_of_l0_models,
# inla_mesh_setup)
# tar_make(
# predicted_raster
# )
#
# tar_load(
# predicted_raster
# )
# }
#
#
# run_targets <- function(specific_arg){
# # this is basically containing _targets.R
# tar_script(
# code = {
# heaps_of_targets,
# heaps_of_targets,
# heaps_of_targets,
# tar_target(
# specific_target = specific_arg
# ),
# heaps_of_targets,
# heaps_of_targets,
# heaps_of_targets,
# },
# script = "user_asked_directory"
# ),
#
# }
#
# # handle writing these as RDS objects to the right spot
# # so the user does this step
# create_data_paths(
# covariates = covariate_object,
# training_data = training_data
# )
#
# ## tar_plan supports drake-style targets and also tar_target()
# tar_plan(
# # read in example infection resistance data
# tar_target(
# file_rds_set,
# read_rds("dir/to/rds_paths_specified_by_user.rds")
# ),
# tar_target(
# training_data,
# file_rds_set(file_rds_set, "training_data"),
# ),
# tar_target(
# training_data,
# file_rds_set(file_rds_set, "training_data"),
# ),
# )
# )