Writes a variable descriptor JSON file for fileMetadata, it will configure the models files metadata within Model Manager in the first upload

write_fileMetadata_json(
  scoreCodeName = "scoreCode.R",
  scoreResource = "model.rda",
  additionalFilesNames = c(),
  additionalFilesRoles = c(),
  path = "./",
  noFile = FALSE
)

Arguments

scoreCodeName

Name of the scoring code file

scoreResource

rda file name or other score resources.

additionalFilesNames

additional files names.

additionalFilesRoles

additional files role names.

path

filepath where to write the json (don't include the filename)

noFile

if you don't want to write to a file, only list the output

Value

  • list of the mapped properties and values.

  • 'ModelProperties.json' file written to path

Examples


## Using default names and files
write_fileMetadata_json(noFile = TRUE)
#>              role           name
#> 1  inputVariables  inputVar.json
#> 2 outputVariables outputVar.json
#> 3           score    scoreCode.R
#> 4   scoreResource      model.rda

## addition file resources
## send 2 vectors with file names and role name, must be of same length

write_fileMetadata_json(additionalFilesNames = c("myFileName.ext", "myFileName2.ext"),
                        additionalFilesRoles = c("scoreResource", "scoreResource"),
                        noFile = TRUE
                        )
#>              role            name
#> 1  inputVariables   inputVar.json
#> 2 outputVariables  outputVar.json
#> 3           score     scoreCode.R
#> 4   scoreResource       model.rda
#> 5   scoreResource  myFileName.ext
#> 6   scoreResource myFileName2.ext