Add a Model to the Database

api_add_model(user_id, spot_id, model, comment = "any comment?",
  parameter = "conc_ec or conc_ie?")

Arguments

user_id

user ID

spot_id

bathing spot ID

model

model object

comment

description of the model. Default: "any comment?"

parameter

name of column containing the variable to be predicted. Must be one of "conc_ec" (E. coli) or "conc_ie" (intestinale enterococci).

Value

This function returns the ID of the added model. The URL to the uploaded binary file is returned in attribute "model_url". From there, the model can be read back with readRDS.