cmu-delphi / cmu-delphi/epiprocess

Add `as.data.frame.epi_archive`, `as_tibble.epi_archive`, `as.data.table.epi_archive`, `reconstruct_archive` helpers

Open
#730 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
12
Forks
8
PR merge metrics
No merged PRs in 30d

Description

To avoid #618 while working around missing archive verbs more ergonomic, it will help to have these helpers:

Archive to data frame (or subclass):
- `as.data.frame.epi_archive`
- `as_tibble.epi_archive` (note: `%>% as.data.frame() %>% as_tibble()` due to `data.table` bug until version with fix is released & we require)
- `as.data.table.epi_archive` (note: do not alias input, or have argument to control)

Data frame (or subclass) back to archive:
- `reconstruct_archive`, similar to `dplyr_reconstruct`. (note: do not alias input, or have argument to control) (may just be able to destructure the `template` argument, then feed its metadata along with the `data` to `new_epi_archive`, `validate_epi_archive`?)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the referenced epi_archive entry points, especially new_epi_archive and validate_epi_archive, and compare reconstruct_archive with dplyr_reconstruct. Check how each requested conversion helper should preserve archive metadata and avoid aliasing its input, including the noted data.table and as.data.frame() to as_tibble() constraints. Done means all five helpers exist with agreed conversion and reconstruction behavior, backed by tests for metadata preservation and input aliasing.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.