Package: dfeR 2.0.0

Cam Race

dfeR: Common Department for Education Analysis Tasks

Provides preferred methods for common analytical tasks undertaken across the Department for Education in England, including number formatting, project templates and curated reference data.

Authors:Cam Race [aut, cre], Department for Education, England [cph], Laura Selby [aut], Adam Robinson [aut], Jen Machin [ctb], Jake Tufts [ctb], Rich Bielby [ctb], Menna Zayed [ctb], Lauren Snaathorst [ctb], Lara Garbett [ctb], Paula Rocha [ctb]

dfeR_2.0.0.tar.gz
dfeR_2.0.0.zip(r-4.7-any)dfeR_2.0.0.zip(r-4.6-any)dfeR_2.0.0.zip(r-4.5-any)
dfeR_2.0.0.tgz(r-4.6-any)dfeR_2.0.0.tgz(r-4.5-any)
dfeR_2.0.0.tar.gz(r-4.7-any)dfeR_2.0.0.tar.gz(r-4.6-any)
dfeR_2.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
dfeR/json (API)

# Install 'dfeR' in R:
install.packages('dfeR', repos = c('https://dfe-analytical-services.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/dfe-analytical-services/dfer/issues

Pkgdown/docs site:https://dfe-analytical-services.github.io

Datasets:

On CRAN:

Conda:

8.02 score 14 stars 21 scripts 327 downloads 38 exports 54 dependencies

Last updated from:7aa8b6f1ad. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK182
source / vignettesOK222
linux-releaseOK204
macos-releaseOK149
macos-oldrelOK166
windows-develOK168
windows-releaseOK149
windows-oldrelOK149
wasm-releaseOK137

Exports:air_installair_stylecheck_databricks_odbccheck_git_sslverifycheck_gitconfig_locationcheck_github_patcheck_proxy_settingscheck_renv_dl_file_methodcheck_renv_download_methodcheck_renv_rprof_locationcheck_rtoolscomma_sepcreate_projectdiagnostic_testfetch_countriesfetch_ladsfetch_lasfetch_lsipsfetch_mayoralfetch_mp_lookupfetch_pconsfetch_regionsfetch_wardsformat_ayformat_ay_reverseformat_fyformat_fy_reverseget_clean_sqlget_ons_api_datapretty_filesizepretty_numpretty_num_tablepretty_timepretty_time_takenround_five_uptoggle_messagewrite_df_to_deltaz_replace

Dependencies:arrowaskpassassertthatbitbit64clicliprcpp11crayoncredentialscurlDBIdescdplyremojifsgenericsgertgitcredsgluehttrhttr2inijsonlitelifecyclemagrittrmimeopensslpakpillarpkgconfigpurrrR6rappdirsrenvrlangrprojrootrstudio.prefsrstudioapirvestselectrstringistringrsystibbletidyselectusethisutf8vctrswhiskerwithrxml2yamlzip

Connecting to SQL
Pre-requisites | Connecting to a database | Reading a SQL script into R | Executing the SQL query | Troubleshooting

Last update: 2026-09-25
Started: 2024-03-27

Creating a new dfeR project
Introduction and prerequisites | Prerequisites | What is RStudio? | How do I install dfeR? | What is an R project? | What is renv? | What is testthat? | What is a GitHub .gitignore file? | Using the create_project() function | Where to save your project | Parameters | Creating a project using code | Example use | Creating a project using the 'New Project Wizard' | Troubleshooting

Last update: 2026-09-25
Started: 2025-05-19

Diagnosing your R setup
Reading the summary | Proxy settings | Git SSL verification | Global .gitconfig location | GITHUB_PAT | renv download method (.Renviron) | RENV_DOWNLOAD_FILE_METHOD | RTools | .Renviron / .Rprofile location | Sharing the full output with support | Troubleshooting

Last update: 2026-09-25
Started: 2026-09-04

Scalable Bulk Writing to Databricks: write_df_to_delta
Executive Summary | Why this is a game-changer for your workflow: | Under the Hood: The REST API Advantage | Prerequisites: Permissions and Authentication | Databricks Permissions | R Session Configuration | Basic Usage | What happens during execution? | Advanced Usage | Precise Data Type Mapping (Arrow Schemas) | Manual Chunking for Memory Management | Overwriting vs. Appending | Performance Benchmarks | Methodology | Key Results | Recommendation: Choosing the Right Tool | Stress Tests | The "Safety Net": Resilience at Scale | Key Results and Observations | Troubleshooting

Last update: 2026-09-25
Started: 2026-02-19

Readme and manuals

Help Manual

Help pageTopics
Air Installair_install
Air - style code in scriptsair_style
Check Databricks ODBC connection variablescheck_databricks_odbc
Check Git sslverify settingcheck_git_sslverify
Check the location of the global .gitconfig filecheck_gitconfig_location
Check GITHUB_PAT settingcheck_github_pat
Check proxy settingscheck_proxy_settings
Check RENV_DOWNLOAD_FILE_METHOD system variablecheck_renv_dl_file_method
Check renv download methodcheck_renv_download_method
Check the location of .Renviron and .Rprofilecheck_renv_rprof_location
Check for an RTools / make toolchaincheck_rtools
Comma separatecomma_sep
Lookup for valid country names and codescountries
Creates a pre-populated project for DfE Rcreate_project
Diagnostic testingdiagnostic_test
Fetch Westminster parliamentary constituenciesfetch fetch_pcons
Fetch countriesfetch_countries
Fetch local authority districtsfetch_lads
Fetch local authoritiesfetch_las
Fetch Local Skills Improvement Plan (LSIP) areas lookupfetch_lsips
Fetch mayoral combined authoritiesfetch_mayoral
Fetch Westminster constituency to MP lookupfetch_mp_lookup
Fetch regionsfetch_regions
Fetch wardsfetch_wards
Format academic yearformat_ay
Undo academic year formattingformat_ay_reverse
Format financial yearformat_fy
Undo financial year formattingformat_fy_reverse
Geography hierarchy lookupgeo_hierarchy
Potential names for geography and time columnsgeog_time_identifiers
Get a cleaned SQL script into Rget_clean_sql
Fetch ONS Open Geography API dataget_ons_api_data
Local Skills Improvement Plan (LSIP) areas to Local Authority District (LAD) Lookuplsip_lad
Lookup for ONS geography columns shorthandsons_geog_shorthands
Pretty numbers into readable file sizepretty_filesize
Prettify big numbers into a readable formatpretty_num
Format a data frame with 'dfeR::pretty_num()'.pretty_num_table
Pretty timepretty_time
Calculate elapsed time between two points and present prettilypretty_time_taken
Lookup for valid region names and codesregions
Round five upround_five_up
Controllable console messagestoggle_message
Write a Data Frame to Delta Lake with COPY INTOwrite_df_to_delta
Replaces 'NA' values in tablesz_replace