{
  "_id": "6a1ef4cbb401979e73416417",
  "Package": "modelc",
  "Title": "A Linear Model to 'SQL' Compiler",
  "Version": "1.0.0.0",
  "Authors@R": "person(\"Sparkfish Analytics\", role=c(\"cph\"))\nperson(given = \"Hugo\", family = \"Saavedra\", email = \"analytics+hugo@sparkfish.com\", role = c(\"aut\", \"cre\"))",
  "Description": "This is a cross-platform linear model to 'SQL' compiler.\nIt generates 'SQL' from linear and generalized linear models.\nIts interface consists of a single function, modelc(), which\ntakes the output of lm() or glm() functions (or any object\nwhich has the same signature) and outputs a 'SQL' character\nvector representing the predictions on the scale of the\nresponse variable as described in Dunn & Smith (2018)\n<doi:10.1007/978-1-4419-0118-7> and originating in Nelder &\nWedderburn (1972) <doi:10.2307/2344614>. The resultant 'SQL'\ncan be included in a 'SELECT' statement and returns output\nsimilar to that of the glm.predict() or lm.predict()\npredictions, assuming numeric types are represented in the\ndatabase using sufficient precision. Currently log and identity\nlink functions are supported.",
  "License": "MIT + file LICENSE",
  "URL": "https://github.com/sparkfish/modelc",
  "BugReports": "https://github.com/sparkfish/modelc/issues",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.1.0",
  "Repository": "https://sparkfish.r-universe.dev",
  "Date/Publication": "2020-06-18 19:06:14 UTC",
  "RemoteUrl": "https://github.com/sparkfish/modelc",
  "RemoteRef": "HEAD",
  "RemoteSha": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-19 07:00:56 UTC",
    "User": "root"
  },
  "Author": "Hugo Saavedra [aut, cre]",
  "Maintainer": "Hugo Saavedra <analytics+hugo@sparkfish.com>",
  "MD5sum": "2a439437e06426a00e0667ab33b0b3be",
  "_user": "sparkfish",
  "_type": "src",
  "_file": "modelc_1.0.0.0.tar.gz",
  "_fileid": "dd99abcda30f86ea72c9f9e010079013655b67a782468caae9e499e0f1af007c",
  "_filesize": 97656,
  "_sha256": "dd99abcda30f86ea72c9f9e010079013655b67a782468caae9e499e0f1af007c",
  "_created": "2026-05-19T07:00:56.000Z",
  "_published": "2026-06-02T15:20:43.283Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79106492771,
      "time": 143,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7076909236"
    },
    {
      "job": 79106492975,
      "time": 101,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7076898346"
    },
    {
      "job": 79106493338,
      "time": 180,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7076903993"
    },
    {
      "job": 79106493205,
      "time": 227,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7076902162"
    },
    {
      "job": 79106492112,
      "time": 154,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7076870196"
    },
    {
      "job": 79106492006,
      "time": 91,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7362042923"
    },
    {
      "job": 79106492914,
      "time": 66,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7076888869"
    },
    {
      "job": 79106493278,
      "time": 60,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7076887445"
    },
    {
      "job": 79106492983,
      "time": 61,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7076887495"
    }
  ],
  "_buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/sparkfish/modelc",
  "_commit": {
    "id": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
    "author": "Hugo Saavedra <hsaavedra@sparkfish.com>",
    "committer": "Hugo Saavedra <hsaavedra@sparkfish.com>",
    "message": "Fix DESCRIPTION file formatting issues, update GitHub links\n",
    "time": 1592507174
  },
  "_maintainer": {
    "name": "Hugo Saavedra",
    "email": "analytics+hugo@sparkfish.com"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "testthat",
      "version": ">= 2.1.0",
      "role": "Suggests"
    }
  ],
  "_owner": "sparkfish",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_topics": [
    "compiler",
    "generalized-linear-models",
    "linear-models",
    "sql",
    "transpiler"
  ],
  "_stars": 1,
  "_contributors": [
    {
      "user": "polynomialherder",
      "count": 18,
      "uuid": 18321626
    },
    {
      "user": "jboarman",
      "count": 5,
      "uuid": 1108065
    }
  ],
  "_userbio": {
    "uuid": 24844869,
    "type": "organization",
    "name": "Sparkfish"
  },
  "_downloads": {
    "count": 172,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/modelc"
  },
  "_devurl": "https://github.com/sparkfish/modelc",
  "_searchresults": 1,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/modelc.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/sparkfish/modelc",
  "_realowner": "sparkfish",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0.0",
      "date": "2020-06-28"
    }
  ],
  "_exports": [
    "modelc"
  ],
  "_help": [
    {
      "page": "apply_linkinverse",
      "title": "Wrap the model SQL in the appropriate link function inverse to return scaled predictions",
      "topics": [
        "apply_linkinverse"
      ]
    },
    {
      "page": "build_additive_term",
      "title": "Get SQL representing a continuous term in the model with no interactions",
      "topics": [
        "build_additive_term"
      ]
    },
    {
      "page": "build_factor_case_statements",
      "title": "Build SQL CASE statements representing the factors in the model",
      "topics": [
        "build_factor_case_statements"
      ]
    },
    {
      "page": "build_interaction_term",
      "title": "Build a SQL interaction term",
      "topics": [
        "build_interaction_term"
      ]
    },
    {
      "page": "build_intercept",
      "title": "Get SQL representing the intercept term given the R model and parameter name",
      "topics": [
        "build_intercept"
      ]
    },
    {
      "page": "build_product",
      "title": "Build a SQL product",
      "topics": [
        "build_product"
      ]
    },
    {
      "page": "extract_level",
      "title": "Extract the level from the factor name",
      "topics": [
        "extract_level"
      ]
    },
    {
      "page": "extract_parameter_coefficient",
      "title": "Extract the coefficient of a model parameter",
      "topics": [
        "extract_parameter_coefficient"
      ]
    },
    {
      "page": "extract_parameters",
      "title": "Extract parameters from a linear model",
      "topics": [
        "extract_parameters"
      ]
    },
    {
      "page": "get_factor_name",
      "title": "Extract the factor name from an R model",
      "topics": [
        "get_factor_name"
      ]
    },
    {
      "page": "has_parameter",
      "title": "Check if an R model contains a coefficient",
      "topics": [
        "has_parameter"
      ]
    },
    {
      "page": "is_factor",
      "title": "Detect if the given model term is a factor",
      "topics": [
        "is_factor"
      ]
    },
    {
      "page": "is_interaction",
      "title": "Detect if the given model term is an interaction",
      "topics": [
        "is_interaction"
      ]
    },
    {
      "page": "is_intercept",
      "title": "Check if the given parameter is the intercept",
      "topics": [
        "is_intercept"
      ]
    },
    {
      "page": "modelc",
      "title": "Compile an R model to a valid TSQL formula",
      "topics": [
        "modelc"
      ]
    }
  ],
  "_readme": "https://github.com/sparkfish/modelc/raw/HEAD/README.md",
  "_rundeps": [],
  "_score": 2.6989700043360187,
  "_indexed": true,
  "_nocasepkg": "modelc",
  "_universes": [
    "sparkfish"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.0.0",
      "date": "2026-05-19T07:03:35.000Z",
      "distro": "noble",
      "commit": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
      "fileid": "389fa515fc8ebfec5f595da374e766b3561df6ec408ad4a046aa018922b492bd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.0.0",
      "date": "2026-05-19T07:02:54.000Z",
      "distro": "noble",
      "commit": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
      "fileid": "e9f835f9f4cf7dbbf662d1723ab5d7cc68aedada2d996acf8db371cefe9353f0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.0.0",
      "date": "2026-05-19T07:03:18.000Z",
      "commit": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
      "fileid": "0d3fa94dade8c2892b35337e3922cc9320ef42cdf259c37896cb561240d87df0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.0.0",
      "date": "2026-05-19T07:03:09.000Z",
      "commit": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
      "fileid": "d5dffaad7dcc31357143b185ffed198edf94bebf06d561b16e1eb17204c9f3c0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.0.0",
      "date": "2026-05-19T07:02:15.000Z",
      "commit": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
      "fileid": "962c5a3b9e5f0a8dd6d7e8c0ce0e3877d220ef5ff398899c502b7399f22ac1ab",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.0.0",
      "date": "2026-05-19T07:02:09.000Z",
      "commit": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
      "fileid": "8bbc806c5e1a87a40ef9628ef485ef433172b27ab6a8ed5976d5e1ec0796b752",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0.0.0",
      "date": "2026-05-19T07:02:09.000Z",
      "commit": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
      "fileid": "9366a0bd463cef06f6d7c0564508c97c20ad2919ff87c631f69ef1958f8da210",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.0.0",
      "date": "2026-06-02T15:20:28.000Z",
      "commit": "2f6a779e2349ac49898fff749dffbf0ad12d40cb",
      "fileid": "0978e9d99ecc5e0f3ad59e0a46c23e809bf416c72b156ad2056fee7a0620457d",
      "status": "success",
      "buildurl": "https://github.com/r-universe/sparkfish/actions/runs/26081562591"
    }
  ]
}