{
  "name": "Missing Value Coalescing and Replacement Functions in R",
  "description": "Comparative specifications, input signatures, type-coercion behaviors, and performance characteristics of missing-value coalescing and imputation functions across R packages, compiled from official CRAN and project documentation.",
  "page": "https://casrai.org/guides/coalesce-in-r",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-16T22:02:51Z",
  "temporalCoverage": "2026",
  "spatialCoverage": "Global",
  "columns": [
    {
      "name": "Function Name",
      "unit": "",
      "description": "Package namespace and function identifier"
    },
    {
      "name": "Package",
      "unit": "",
      "description": "Originating R package or base system"
    },
    {
      "name": "CRAN Release",
      "unit": "",
      "description": "Current package version verified on CRAN"
    },
    {
      "name": "Evaluation Order",
      "unit": "",
      "description": "Direction and sequence of vector evaluation"
    },
    {
      "name": "Type Handling",
      "unit": "",
      "description": "Type coercion and compatibility rules enforced"
    },
    {
      "name": "NaN Treatment",
      "unit": "",
      "description": "Behavior when encountering IEEE NaN values"
    },
    {
      "name": "Direct List Input",
      "unit": "",
      "description": "Whether a list or data frame can be passed directly without splicing"
    }
  ],
  "rows": [
    {
      "Function Name": "dplyr::coalesce",
      "Package": "dplyr",
      "CRAN Release": "1.2.1",
      "Evaluation Order": "Left-to-right priority",
      "Type Handling": "vctrs common type (strict error on mismatch)",
      "NaN Treatment": "Treated as NA (replaced)",
      "Direct List Input": "Requires dynamic dots splice (!!!)"
    },
    {
      "Function Name": "data.table::fcoalesce",
      "Package": "data.table",
      "CRAN Release": "1.18.6.1",
      "Evaluation Order": "Left-to-right priority",
      "Type Handling": "Strict class match (factors require identical levels)",
      "NaN Treatment": "Configurable via nan argument (default NA)",
      "Direct List Input": "Supported directly (list or data.table)"
    },
    {
      "Function Name": "tidyr::replace_na",
      "Package": "tidyr",
      "CRAN Release": "1.3.1",
      "Evaluation Order": "Target replacement",
      "Type Handling": "Matches replacement value to vector type",
      "NaN Treatment": "Treated as value unless specified",
      "Direct List Input": "Requires named list for data frames"
    },
    {
      "Function Name": "base::ifelse",
      "Package": "base",
      "CRAN Release": "R (>= 4.1.0)",
      "Evaluation Order": "Element-wise conditional",
      "Type Handling": "Coerces to common mode (strips S3 class/Date)",
      "NaN Treatment": "Preserved as condition test result",
      "Direct List Input": "Not supported (vectors only)"
    },
    {
      "Function Name": "base vector indexing",
      "Package": "base",
      "CRAN Release": "R (>= 4.1.0)",
      "Evaluation Order": "Logical subscript replacement",
      "Type Handling": "Preserves target vector class attributes",
      "NaN Treatment": "Identified by is.na() as TRUE",
      "Direct List Input": "Not supported (requires iteration)"
    }
  ],
  "sources": [
    {
      "title": "dplyr: Find the first non-missing element (coalesce)",
      "url": "https://dplyr.tidyverse.org/reference/coalesce.html",
      "accessed": "2026-11-16"
    },
    {
      "title": "CRAN Package data.table Reference Manual",
      "url": "https://cran.r-project.org/web/packages/data.table/index.html",
      "accessed": "2026-11-16"
    },
    {
      "title": "vctrs: Prototype and Size Architecture",
      "url": "https://vctrs.r-lib.org/reference/vec_ptype2.html",
      "accessed": "2026-11-16"
    },
    {
      "title": "The R Project for Statistical Computing: NA and ifelse Documentation",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/base/html/NA.html",
      "accessed": "2026-11-16"
    }
  ]
}