Skip to content

[Query] Function Info

github-actions[bot] edited this page Sep 19, 2026 · 1 revision

Generated from 'wiki-query.ts' on 2026-09-10, 07:04:46 UTC (v2.15.8), do not edit directly.

Function Info Query [overview]

Reports where a function name comes from: which packages export it, their signature, and whether flowR itself has a built-in definition for it.
This query is requested with the type function-info.
Run in the REPL: :query @function-info <name> [<package>...]

This query answers "where does this function come from?" for a bare name, combining two sources flowR otherwise consults separately: the signature database (which packages export the name, and their signature/definition site) and flowR's own built-in configuration (whether flowR models the name itself, and how).

Given a base-R name such as sd:

[
  {
    "type": "function-info",
    "name": "sd"
  }
]
Show Results

Results (prettified and summarized):

Query: function-info (50 ms)
   ╰ stats (x, na.rm) (R/sd.R:19)
   ╰ posterior (x, ...) (R/rvar-summaries-over-draws.R:192)
   ╰ h2o (x, na.rm) (R/frame.R:2998)
   ╰ mosaic
   ╰ elliptic (u, m, ...) (R/elliptic.R:1447)
   ╰ sn (R/sn-funct.R:5070)
   ╰ actuar (x, ...) (R/var-methods.R:12)
   ╰ rapportools (R/univar.R:189)
   ╰ circular (x, ...) (R/sd.circular.R:2)
   ╰ CVXR (x, ...) (R/263_zzz_R_specific_masking.R:56)
   ╰ fdth (x, ...) (R/sd.R:2)
   ╰ ftsa (R/sd.R:1)
   ╰ Bolstad (x, ...) (R/sd.R:6)
   ╰ crunch (x, na.rm) (R/univariate.R:65)
   ╰ spant (x, na.rm) (R/mrs_data_proc.R:3140)
   ╰ DynTxRegime (x, na.rm) (R/E_class_IQLearnFS_C.R:169)
   ╰ RSDA (x, ...) (R/symbolic_objects.R:405)
   ╰ cmvnorm (x, na.rm) (R/cmvnorm.R:276)
   ╰ BayesTools (x, ...) (R/priors.R:2213)
   ╰ spectrolab (x, na.rm) (R/stats_function_overloads.R:121)
   ╰ tf (x, na.rm) (R/summarize.R:113)
   ╰ fChange (object, ...) (R/generic_functions.R:263)
   ╰ HistDat (R/histogram.R:175)
   ╰ estimators (R/02_Weib.R:137)
   ╰ ReMFPCA (x, ...) (R/mfdMethods.R:92)
   ╰ rvec (x, na.rm) (R/sd.R:32)
   ╰ joker (R/02_Weib.R:239)
   ╰ ibdsegments (x, ...) (R/distribution_methods.R:55)
   ╰ descsuppR (x, ...) (R/tod.r:201)
   ╰ tidyna (x, na.rm, all_na, ...) (R/aaa-utils.R:25)
   ╰ flowR built-in stats::sd [function] processor builtin:d-ra, primitive\

Show Detailed Results as Json

The analysis ran (including parsing and normalization and the query) within the generation environment.

In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR. Please consult the Interface wiki page for more information on how to get those.

{
  "function-info": {
    ".meta": {},
    "name": "sd",
    "packages": [
      {"package":"stats","exported":true,"parameters":["x","na.rm"],"file":"R/sd.R","line":19},
      {"package":"posterior","exported":true,"parameters":["x","..."],"file":"R/rvar-summaries-over-draws.R","line":192},
      {"package":"h2o","exported":true,"parameters":["x","na.rm"],"file":"R/frame.R","line":2998},
      {"package":"mosaic","exported":true,"parameters":[],"line":-1},
      {"package":"elliptic","exported":true,"parameters":["u","m","..."],"file":"R/elliptic.R","line":1447},
      {"package":"sn","exported":true,"parameters":[],"file":"R/sn-funct.R","line":5070},
      {"package":"actuar","exported":true,"parameters":["x","..."],"file":"R/var-methods.R","line":12},
      {"package":"rapportools","exported":true,"parameters":[],"file":"R/univar.R","line":189},
      {"package":"circular","exported":true,"parameters":["x","..."],"file":"R/sd.circular.R","line":2},
      {"package":"CVXR","exported":true,"parameters":["x","..."],"file":"R/263_zzz_R_specific_masking.R","line":56},
      {"package":"fdth","exported":true,"parameters":["x","..."],"file":"R/sd.R","line":2},
      {"package":"ftsa","exported":true,"parameters":[],"file":"R/sd.R","line":1},
      {"package":"Bolstad","exported":true,"parameters":["x","..."],"file":"R/sd.R","line":6},
      {"package":"crunch","exported":true,"parameters":["x","na.rm"],"file":"R/univariate.R","line":65},
      {"package":"spant","exported":true,"parameters":["x","na.rm"],"file":"R/mrs_data_proc.R","line":3140},
      {"package":"DynTxRegime","exported":true,"parameters":["x","na.rm"],"file":"R/E_class_IQLearnFS_C.R","line":169},
      {"package":"RSDA","exported":true,"parameters":["x","..."],"file":"R/symbolic_objects.R","line":405},
      {"package":"cmvnorm","exported":true,"parameters":["x","na.rm"],"file":"R/cmvnorm.R","line":276},
      {"package":"BayesTools","exported":true,"parameters":["x","..."],"file":"R/priors.R","line":2213},
      {"package":"spectrolab","exported":true,"parameters":["x","na.rm"],"file":"R/stats_function_overloads.R","line":121},
      {"package":"tf","exported":true,"parameters":["x","na.rm"],"file":"R/summarize.R","line":113},
      {"package":"fChange","exported":true,"parameters":["object","..."],"file":"R/generic_functions.R","line":263},
      {"package":"HistDat","exported":true,"parameters":[],"file":"R/histogram.R","line":175},
      {"package":"estimators","exported":true,"parameters":[],"file":"R/02_Weib.R","line":137},
      {"package":"ReMFPCA","exported":true,"parameters":["x","..."],"file":"R/mfdMethods.R","line":92},
      {"package":"rvec","exported":true,"parameters":["x","na.rm"],"file":"R/sd.R","line":32},
      {"package":"joker","exported":true,"parameters":[],"file":"R/02_Weib.R","line":239},
      {"package":"ibdsegments","exported":true,"parameters":["x","..."],"file":"R/distribution_methods.R","line":55},
      {"package":"descsuppR","exported":true,"parameters":["x","..."],"file":"R/tod.r","line":201},
      {"package":"tidyna","exported":true,"parameters":["x","na.rm","all_na","..."],"file":"R/aaa-utils.R","line":25}
    ],
    "builtin": [{"kind":"function","namespace":"stats","processor":"builtin:d-ra","assumePrimitive":true,"tags":[],"configKeys":["props","sig"]}]
  },
  ".meta": {}
}

The packages property restricts which packages are considered (every exporting package is checked by default), which is useful once a name is exported by more than one package on CRAN. A name flowR models itself, like get, also reports the built-in's processor, its evaluation handler (if it folds to a constant), and the semantic tags flowR states for it:

[
  {
    "type": "function-info",
    "name": "get"
  }
]
Show Results

Results (prettified and summarized):

Query: function-info (9 ms)
   ╰ base (x, pos, envir, mode, inherits) (R/get.R:26)
   ╰ config (value, config, file, use_parent) (R/get.R:43)
   ╰ crmPack
   ╰ ale (obj, ...) (R/000-startup.R:52)
   ╰ flowR built-in base::get [function] processor builtin:get, eval eval:get, eval\

Show Detailed Results as Json

The analysis ran (including parsing and normalization and the query) within the generation environment.

In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR. Please consult the Interface wiki page for more information on how to get those.

{
  "function-info": {
    ".meta": {},
    "name": "get",
    "packages": [
      {"package":"base","exported":true,"parameters":["x","pos","envir","mode","inherits"],"file":"R/get.R","line":26},
      {"package":"config","exported":true,"parameters":["value","config","file","use_parent"],"file":"R/get.R","line":43},
      {"package":"crmPack","exported":true,"parameters":[],"line":-1},
      {"package":"ale","exported":true,"parameters":["obj","..."],"file":"R/000-startup.R","line":52}
    ],
    "builtin": [
      {
        "kind": "function",
        "namespace": "base",
        "processor": "builtin:get",
        "assumePrimitive": false,
        "evalHandler": "eval:get",
        "tags": ["eval"],
        "configKeys": ["props","tags","sig"]
      }
    ]
  },
  ".meta": {}
}

Note

To find out what a script uses, reach for the Dependencies Query; to inspect a specific package/version in the database directly, reach for the Signature Query. In the REPL, :signature info <name> is a shorthand for this query.

Implementation Details

Responsible for the execution of the Function Info Query query is executeFunctionInfoQuery in ./src/queries/catalog/function-info-query/function-info-query-executor.ts.

Clone this wiki locally