Package: interfacer 0.2.4

Robert Challen

interfacer: Define and Enforce Contracts for Dataframes as Function Parameters

A dataframe validation framework for package builders who use dataframes as function parameters. It performs checks on column names, coerces data-types, and checks grouping to make sure user inputs conform to a specification provided by the package author. It provides a mechanism for package authors to automatically document supported dataframe inputs and selectively dispatch to functions depending on the format of a dataframe much like S3 does for classes. It also contains some developer tools to make working with and documenting dataframe specifications easier. It helps package developers to improve their documentation and simplifies parameter validation where dataframes are used as function parameters.

Authors:Robert Challen [aut, cre, cph]

interfacer_0.2.4.tar.gz
interfacer_0.2.4.zip(r-4.5)interfacer_0.2.4.zip(r-4.4)interfacer_0.2.4.zip(r-4.3)
interfacer_0.2.4.tgz(r-4.4-any)interfacer_0.2.4.tgz(r-4.3-any)
interfacer_0.2.4.tar.gz(r-4.5-noble)interfacer_0.2.4.tar.gz(r-4.4-noble)
interfacer_0.2.4.tgz(r-4.4-emscripten)interfacer_0.2.4.tgz(r-4.3-emscripten)
interfacer.pdf |interfacer.html
interfacer/json (API)
NEWS

# Install 'interfacer' in R:
install.packages('interfacer', repos = c('https://bristol-vaccine-centre.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/bristol-vaccine-centre/interfacer/issues

On CRAN:

37 exports 2 stars 1.92 score 39 dependencies 2 dependents 10 scripts 349 downloads

Last updated 1 months agofrom:f2b959fcdc (on 0.2.4). Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 14 2024
R-4.5-winOKSep 14 2024
R-4.5-linuxOKSep 14 2024
R-4.4-winOKSep 14 2024
R-4.4-macOKSep 14 2024
R-4.3-winOKSep 14 2024
R-4.3-macOKSep 14 2024

Exports:%>%iclipiconvertidispatchidocumentif_col_presentifaceigroup_processimapperiprotoireturnis_col_presentis.ifaceitestivalidateswitch_pipelinetype.anythingtype.charactertype.completetype.datetype.defaulttype.doubletype.enumtype.factortype.finitetype.group_uniquetype.in_rangetype.integertype.logicaltype.not_missingtype.numerictype.of_typetype.positive_doubletype.positive_integertype.proportionuse_dataframeuse_iface

Dependencies:brewcallrclicommonmarkcpp11descdigestdplyrevaluatefansiforcatsfsgenericsgluehighrknitrlifecyclemagrittrpillarpkgbuildpkgconfigpkgloadprocessxpspurrrR6rlangroxygen2rprojrootstringistringrtibbletidyselectutf8vctrswithrxfunxml2yaml

Dataframe validation

Rendered frominterfacer.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-07-26
Started: 2023-07-18

Multiple dispatch based on dataframes

Rendered fromdispatch.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-07-26
Started: 2024-07-24

Nested dataframes and purrr style list columns

Rendered fromnesting.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-07-24
Started: 2024-07-24

Tools to work with interfacer

Rendered fromdevtools.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-07-26
Started: 2024-07-24

Readme and manuals

Help Manual

Help pageTopics
Cast an 'iface' to a plain list.as.list.iface
Format an 'iface' specification for printingformat.iface
Create an 'iface' specification from an example dataframeiclip
Convert a dataframe to a format compatible with an interface specificationiconvert
Dispatch to a named function based on the characteristics of a dataframeidispatch
Document an interface contract for inserting into 'roxygen2'idocument
Execute a function or return a value if a column in present in a dataframeif_col_present
Construct an interface specificationiface
Handle unexpected additional grouping structureigroup_process
Specify mappings that can make dataframes compatible with an 'iface' specificationimapper
Generate a zero length dataframe conforming to an 'iface' specificationiproto
Check a return parameter from a functionireturn
Check for existence of a set of columns in a dataframeis_col_present
Check if an object is an interface specificationis.iface
Test dataframe conformance to an interface specification.itest
Perform interface checks on dataframe inputs using enclosing function formal parameter definitionsivalidate
Format an 'iface' specification for printingknit_print.iface
Format an 'iface' specification for printingprint.iface
Parser for @iparam tagsroxy_tag_parse.roxy_tag_iparam
Support for @iparam tagsroxy_tag_rd.roxy_tag_iparam
Branch a 'dplyr' pipeline based on a set of conditionsswitch_pipeline
Coerce to an unspecified typetype.anything
Coerce to a character.type.character
Coerce to a complete set of values.type.complete
Coerce to a Date.type.date
Set a default value for a columntype.default
Coerce to a double.type.double
Define a conformance rule to match a factor with specific levels.type.enum
Coerce to a factor.type.factor
Check for non-finite valuestype.finite
Coerce to a unique value.type.group_unique
Define a conformance rule to confirm that a numeric is in a set rangetype.in_range
Coerce to integertype.integer
Coerce to a logicaltype.logical
Check for missing valuestype.not_missing
Coerce to a numeric.type.numeric
Check for a given classtype.of_type
Coerce to a positive double.type.positive_double
Coerce to a positive integer.type.positive_integer
Coerce to a number between 0 and 1type.proportion
Use a dataframe in a package including structure based documentationuse_dataframe
Generate interfacer code for a dataframeuse_iface