| Title: | Read and Analyze 'Anki' Flashcard Databases |
|---|---|
| Description: | Comprehensive toolkit for reading and analyzing 'Anki' flashcard collection databases. Provides functions to access notes, cards, decks, note types, and review logs with a tidy interface. Features extensive analytics including retention rates, learning curves, forgetting curve fitting, and review patterns. Supports 'FSRS' (Free Spaced Repetition Scheduler) analysis with stability, difficulty, retrievability metrics, parameter comparison, and workload predictions. Includes visualization functions, comparative analysis, time-based analytics, card quality assessment, sibling card analysis, interference detection, predictive features, session simulation, and an interactive Shiny dashboard. Academic/exam preparation tools for medical students and board exam preparation. Export capabilities include CSV, Org-mode, Markdown, SuperMemo, Mochi, Obsidian SR, and JSON formats with progress reports. |
| Authors: | Christos Longros [aut, cre] |
| Maintainer: | Christos Longros <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.6.6 |
| Built: | 2026-05-19 09:59:00 UTC |
| Source: | https://github.com/chrislongros/ankiR |
Run common analyses on data imported from ankiR Stats addon.
analyze_addon_import(data)analyze_addon_import(data)
data |
Data imported via import_addon_export() |
A list with analysis results
## Not run: data <- import_addon_export("ankir_export.json") analysis <- analyze_addon_import(data) analysis$retention_trend ## End(Not run)## Not run: data <- import_addon_export("ankir_export.json") analysis <- analyze_addon_import(data) analysis$retention_trend ## End(Not run)
Compare retention, efficiency, and performance across different note types, deck settings, card formats, or custom groups.
anki_ab_comparison( path = NULL, profile = NULL, by = "note_type", min_reviews = 100 )anki_ab_comparison( path = NULL, profile = NULL, by = "note_type", min_reviews = 100 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Comparison dimension: "note_type", "deck", "tag", "created_period" (default "note_type") |
min_reviews |
Minimum reviews per group to include (default 100) |
A tibble with comparison statistics
## Not run: # Compare note types comp <- anki_ab_comparison(by = "note_type") # Compare decks comp <- anki_ab_comparison(by = "deck") ## End(Not run)## Not run: # Compare note types comp <- anki_ab_comparison(by = "note_type") # Compare decks comp <- anki_ab_comparison(by = "deck") ## End(Not run)
Calculate how long it would take to clear your review backlog at different review rates, and project backlog growth if you stop studying.
anki_backlog_calculator(path = NULL, profile = NULL, new_cards_per_day = 0)anki_backlog_calculator(path = NULL, profile = NULL, new_cards_per_day = 0)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
new_cards_per_day |
Expected new cards per day (0 = maintenance mode) |
A list with backlog analysis and projections
## Not run: backlog <- anki_backlog_calculator() backlog$current backlog$scenarios ## End(Not run)## Not run: backlog <- anki_backlog_calculator() backlog$current backlog$scenarios ## End(Not run)
Returns the default Anki2 directory for the current platform.
anki_base_path()anki_base_path()
Character string path to Anki2 directory
## Not run: anki_base_path() ## End(Not run)## Not run: anki_base_path() ## End(Not run)
Compare your statistics against typical FSRS users (based on published research).
anki_benchmark(path = NULL, profile = NULL)anki_benchmark(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with your stats vs benchmarks
## Not run: anki_benchmark() ## End(Not run)## Not run: anki_benchmark() ## End(Not run)
Analyzes retention and performance by hour of day and day of week to identify when you learn best.
anki_best_review_times(path = NULL, profile = NULL, min_reviews = 50)anki_best_review_times(path = NULL, profile = NULL, min_reviews = 50)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
min_reviews |
Minimum reviews per time slot for analysis (default 50) |
A list with optimal time analysis
## Not run: times <- anki_best_review_times() times$best_hours times$best_days ## End(Not run)## Not run: times <- anki_best_review_times() times$best_hours times$best_days ## End(Not run)
Get buried cards
anki_buried(path = NULL, profile = NULL, include_notes = FALSE)anki_buried(path = NULL, profile = NULL, include_notes = FALSE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
include_notes |
If TRUE, join with note data |
A tibble of buried cards
## Not run: buried <- anki_buried() ## End(Not run)## Not run: buried <- anki_buried() ## End(Not run)
Analyzes study patterns to detect potential burnout indicators: declining retention, increasing response time, shorter sessions, more "Again" presses, decreased consistency.
anki_burnout_detection( path = NULL, profile = NULL, days = 30, baseline_days = 90 )anki_burnout_detection( path = NULL, profile = NULL, days = 30, baseline_days = 90 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to analyze (default 30) |
baseline_days |
Days to use as baseline for comparison (default 90) |
A list with burnout indicators and recommendations
## Not run: burnout <- anki_burnout_detection() burnout$risk_level burnout$indicators ## End(Not run)## Not run: burnout <- anki_burnout_detection() burnout$risk_level burnout$indicators ## End(Not run)
Measures card complexity based on field content, media usage, etc.
anki_card_complexity(path = NULL, profile = NULL)anki_card_complexity(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with card complexity metrics
## Not run: complexity <- anki_card_complexity() ## End(Not run)## Not run: complexity <- anki_card_complexity() ## End(Not run)
Analyze card content: word count, cloze density, complexity score, and correlations with retention.
anki_card_content(path = NULL, profile = NULL, sample_size = 1000)anki_card_content(path = NULL, profile = NULL, sample_size = 1000)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
sample_size |
Max cards to analyze (default 1000, NULL for all) |
A list with content analysis
## Not run: content <- anki_card_content() content$summary content$complexity_retention ## End(Not run)## Not run: content <- anki_card_content() content$summary content$complexity_retention ## End(Not run)
Generates actionable recommendations for improving your collection: cards to unsuspend, leeches to rewrite, near-duplicates to merge, etc.
anki_card_recommendations(path = NULL, profile = NULL)anki_card_recommendations(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with categorized recommendations
## Not run: recs <- anki_card_recommendations() recs$leeches_to_rewrite recs$cards_to_unsuspend ## End(Not run)## Not run: recs <- anki_card_recommendations() recs$leeches_to_rewrite recs$cards_to_unsuspend ## End(Not run)
Read cards from Anki collection
anki_cards(path = NULL, profile = NULL)anki_cards(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of cards with columns: cid, nid, did, type, queue, due, ivl, reps, lapses
## Not run: anki_cards() ## End(Not run)## Not run: anki_cards() ## End(Not run)
Extracts cards along with their FSRS (Free Spaced Repetition Scheduler) memory state parameters. FSRS-6 stores stability, difficulty, and a per-card decay parameter in the card's data field.
anki_cards_fsrs(path = NULL, profile = NULL)anki_cards_fsrs(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of cards with FSRS parameters:
cid - Card ID
nid - Note ID
did - Deck ID
type - Card type (0=new, 1=learning, 2=review, 3=relearning)
queue - Queue (-1=suspended, 0=new, 1=learning, 2=review, 3=day learning, 4=preview)
due - Due date/position
ivl - Current interval in days
reps - Number of reviews
lapses - Number of lapses
stability - FSRS stability (S) in days
difficulty - FSRS difficulty (D), range 1-10
desired_retention - Target retention rate
decay - FSRS-6 decay parameter (w20), typically 0.1-0.8
## Not run: cards_fsrs <- anki_cards_fsrs() # Calculate current retrievability cards_fsrs$retrievability <- fsrs_retrievability( stability = cards_fsrs$stability, days_elapsed = as.numeric(Sys.Date() - as.Date("1970-01-01")) - cards_fsrs$due / 86400, decay = cards_fsrs$decay ) ## End(Not run)## Not run: cards_fsrs <- anki_cards_fsrs() # Calculate current retrievability cards_fsrs$retrievability <- fsrs_retrievability( stability = cards_fsrs$stability, days_elapsed = as.numeric(Sys.Date() - as.Date("1970-01-01")) - cards_fsrs$due / 86400, decay = cards_fsrs$decay ) ## End(Not run)
Returns cards joined with notes, decks, and models for complete analysis.
anki_cards_full(path = NULL, profile = NULL)anki_cards_full(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with card data joined with note content, deck names, and model info
## Not run: cards_full <- anki_cards_full() ## End(Not run)## Not run: cards_full <- anki_cards_full() ## End(Not run)
Compare card performance by when they were added. Cards added in the same period form a "cohort" and their learning outcomes are compared.
anki_cohort_analysis( path = NULL, profile = NULL, cohort_size = "month", min_cards = 20 )anki_cohort_analysis( path = NULL, profile = NULL, cohort_size = "month", min_cards = 20 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
cohort_size |
Size of each cohort: "week", "month", "quarter" (default "month") |
min_cards |
Minimum cards per cohort to include (default 20) |
A tibble with cohort statistics
## Not run: cohorts <- anki_cohort_analysis() cohorts ## End(Not run)## Not run: cohorts <- anki_cohort_analysis() cohorts ## End(Not run)
Opens an Anki collection database and returns an object with methods to access notes, cards, decks, note types, and review logs.
anki_collection(path = NULL, profile = NULL)anki_collection(path = NULL, profile = NULL)
path |
Path to collection.anki2 file. If NULL, auto-detected from default Anki location. |
profile |
Profile name. If NULL, uses first available profile. |
An anki_collection object with methods:
notes() - Get all notes
cards() - Get all cards
revlog() - Get review log
decks() - Get deck information
models() - Get note types (models)
tables() - List all tables
close() - Close database connection
## Not run: col <- anki_collection() col$notes() col$decks() col$close() ## End(Not run)## Not run: col <- anki_collection() col$notes() col$decks() col$close() ## End(Not run)
Analyze how retention varies by how long you've been studying cards.
anki_compare_by_age(path = NULL, profile = NULL)anki_compare_by_age(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with retention by card age
## Not run: anki_compare_by_age() ## End(Not run)## Not run: anki_compare_by_age() ## End(Not run)
Compare performance by deck difficulty
anki_compare_deck_difficulty(path = NULL, profile = NULL)anki_compare_deck_difficulty(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble ranking decks by difficulty metrics
## Not run: anki_compare_deck_difficulty() ## End(Not run)## Not run: anki_compare_deck_difficulty() ## End(Not run)
Side-by-side comparison of deck statistics.
anki_compare_decks(path = NULL, profile = NULL, decks = NULL)anki_compare_decks(path = NULL, profile = NULL, decks = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
decks |
Optional vector of deck names to compare (NULL for all) |
A tibble with comparative statistics
## Not run: anki_compare_decks() anki_compare_decks(decks = c("Medical", "Anatomy")) ## End(Not run)## Not run: anki_compare_decks() anki_compare_decks(decks = c("Medical", "Anatomy")) ## End(Not run)
Run multiple forecasting methods and compare their predictions.
anki_compare_forecasts( path = NULL, profile = NULL, days_ahead = 30, methods = c("holt", "arima", "seasonal", "monte_carlo") )anki_compare_forecasts( path = NULL, profile = NULL, days_ahead = 30, methods = c("holt", "arima", "seasonal", "monte_carlo") )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days_ahead |
Number of days to forecast (default 30) |
methods |
Methods to compare (default: all available) |
A list with comparison results
## Not run: comp <- anki_compare_forecasts(days_ahead = 14) comp$summary ## End(Not run)## Not run: comp <- anki_compare_forecasts(days_ahead = 14) comp$summary ## End(Not run)
Detailed statistical comparison between two groups (decks, note types, etc.)
anki_compare_groups(path = NULL, profile = NULL, group_a, group_b, by = "deck")anki_compare_groups(path = NULL, profile = NULL, group_a, group_b, by = "deck")
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
group_a |
First group name/pattern |
group_b |
Second group name/pattern |
by |
Comparison dimension: "note_type", "deck", "tag" |
A list with detailed comparison statistics
## Not run: comp <- anki_compare_groups("Basic", "Cloze", by = "note_type") comp$winner comp$differences ## End(Not run)## Not run: comp <- anki_compare_groups("Basic", "Cloze", by = "note_type") comp$winner comp$differences ## End(Not run)
Compare study statistics between two time periods.
anki_compare_periods( path = NULL, profile = NULL, period1 = NULL, period2 = NULL, period_names = c("Period 1", "Period 2") )anki_compare_periods( path = NULL, profile = NULL, period1 = NULL, period2 = NULL, period_names = c("Period 1", "Period 2") )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
period1 |
First period as c(start_date, end_date) |
period2 |
Second period as c(start_date, end_date) |
period_names |
Names for the periods (default: "Period 1", "Period 2") |
A tibble comparing the two periods
## Not run: # Compare this month vs last month anki_compare_periods( period1 = c("2024-01-01", "2024-01-31"), period2 = c("2024-02-01", "2024-02-29"), period_names = c("January", "February") ) ## End(Not run)## Not run: # Compare this month vs last month anki_compare_periods( period1 = c("2024-01-01", "2024-01-31"), period2 = c("2024-02-01", "2024-02-29"), period_names = c("January", "February") ) ## End(Not run)
Measures how consistent your study habits are.
anki_consistency(path = NULL, profile = NULL, days = 90)anki_consistency(path = NULL, profile = NULL, days = 90)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to analyze |
A list with consistency metrics
## Not run: anki_consistency() ## End(Not run)## Not run: anki_consistency() ## End(Not run)
Shows percentage complete, mature, and retained by topic (tag or subdeck).
anki_coverage_analysis( path = NULL, profile = NULL, by = "tag", pattern = NULL, min_cards = 10 )anki_coverage_analysis( path = NULL, profile = NULL, by = "tag", pattern = NULL, min_cards = 10 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Analysis type: "tag" or "deck" (default "tag") |
pattern |
Optional pattern to filter tags/decks |
min_cards |
Minimum cards to include in analysis (default 10) |
A tibble with coverage analysis per topic
## Not run: coverage <- anki_coverage_analysis() coverage <- anki_coverage_analysis(pattern = "Anatomy") ## End(Not run)## Not run: coverage <- anki_coverage_analysis() coverage <- anki_coverage_analysis(pattern = "Anatomy") ## End(Not run)
Opens a Shiny dashboard with comprehensive collection analytics.
anki_dashboard(path = NULL, profile = NULL)anki_dashboard(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
Opens a Shiny app in the browser
## Not run: anki_dashboard() ## End(Not run)## Not run: anki_dashboard() ## End(Not run)
Returns the full path to an Anki collection database file.
anki_db_path(profile = NULL, base_path = NULL)anki_db_path(profile = NULL, base_path = NULL)
profile |
Profile name. If NULL, uses the first available profile. |
base_path |
Path to Anki2 directory (auto-detected if NULL) |
Character string path to collection.anki2 or collection.anki21
## Not run: anki_db_path() anki_db_path("User 1") ## End(Not run)## Not run: anki_db_path() anki_db_path("User 1") ## End(Not run)
Read decks from Anki collection
anki_decks(path = NULL, profile = NULL)anki_decks(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of decks with columns: did, name
## Not run: anki_decks() ## End(Not run)## Not run: anki_decks() ## End(Not run)
Get cards due for review
anki_due(path = NULL, profile = NULL, days_ahead = 0)anki_due(path = NULL, profile = NULL, days_ahead = 0)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days_ahead |
Number of days to look ahead (default 0 = today only) |
A tibble of due cards
## Not run: due_today <- anki_due() due_week <- anki_due(days_ahead = 7) ## End(Not run)## Not run: due_today <- anki_due() due_week <- anki_due(days_ahead = 7) ## End(Not run)
Identifies cards that have empty required fields.
anki_empty_cards(path = NULL, profile = NULL)anki_empty_cards(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of cards with empty fields
## Not run: empty <- anki_empty_cards() ## End(Not run)## Not run: empty <- anki_empty_cards() ## End(Not run)
Projects whether you'll complete cards before an exam, at what retention level. Useful for medical board exam preparation.
anki_exam_readiness( path = NULL, profile = NULL, target_date, deck_pattern = NULL, new_cards_per_day = 20, target_retention = 0.9 )anki_exam_readiness( path = NULL, profile = NULL, target_date, deck_pattern = NULL, new_cards_per_day = 20, target_retention = 0.9 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
target_date |
Exam date (Date or character "YYYY-MM-DD") |
deck_pattern |
Pattern to match deck names (e.g., "Step1", "USMLE") |
new_cards_per_day |
Expected new cards per day (default 20) |
target_retention |
Target retention rate (default 0.90) |
A list with exam readiness analysis
## Not run: readiness <- anki_exam_readiness(target_date = "2024-06-15", deck_pattern = "Step1") ## End(Not run)## Not run: readiness <- anki_exam_readiness(target_date = "2024-06-15", deck_pattern = "Step1") ## End(Not run)
Export to Anki-importable format
anki_export_importable(data, file, tags = NULL)anki_export_importable(data, file, tags = NULL)
data |
Data frame with front and back columns |
file |
Output file path |
tags |
Optional tags |
Invisibly returns number of cards
## Not run: cards <- data.frame(front = c("Q1", "Q2"), back = c("A1", "A2")) anki_export_importable(cards, "new_cards.txt") ## End(Not run)## Not run: cards <- data.frame(front = c("Q1", "Q2"), back = c("A1", "A2")) anki_export_importable(cards, "new_cards.txt") ## End(Not run)
Exports the full review log to CSV.
anki_export_revlog( file, path = NULL, profile = NULL, include_card_info = FALSE )anki_export_revlog( file, path = NULL, profile = NULL, include_card_info = FALSE )
file |
Output file path |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
include_card_info |
If TRUE, join with card data |
Invisibly returns the exported data
## Not run: anki_export_revlog("my_reviews.csv") ## End(Not run)## Not run: anki_export_revlog("my_reviews.csv") ## End(Not run)
Splits the field content (separated by \x1f) into separate columns.
anki_field_contents(path = NULL, profile = NULL, model_id = NULL)anki_field_contents(path = NULL, profile = NULL, model_id = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
model_id |
Optional model ID to filter notes. If NULL, uses first model. |
A tibble with nid and separate columns for each field
## Not run: fields <- anki_field_contents() ## End(Not run)## Not run: fields <- anki_field_contents() ## End(Not run)
Find cards with similar content to a given card or text.
anki_find_similar( query, path = NULL, profile = NULL, n = 10, method = "tfidf", within_deck = FALSE )anki_find_similar( query, path = NULL, profile = NULL, n = 10, method = "tfidf", within_deck = FALSE )
query |
Either a card ID or text to search for similar cards |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
n |
Number of similar cards to return (default 10) |
method |
Similarity method: "tfidf", "jaccard", or "ngram" |
within_deck |
Only search within same deck as query card |
A tibble with similar cards and similarity scores
## Not run: # Find cards similar to card ID 1234567890 anki_find_similar(1234567890) # Find cards similar to specific text anki_find_similar("mitochondria powerhouse") ## End(Not run)## Not run: # Find cards similar to card ID 1234567890 anki_find_similar(1234567890) # Find cards similar to specific text anki_find_similar("mitochondria powerhouse") ## End(Not run)
Fits a forgetting curve to actual review data and compares it to the theoretical FSRS curve. Can analyze individual cards or aggregate data.
anki_fit_forgetting_curve( path = NULL, profile = NULL, cid = NULL, min_reviews = 5, max_cards = 1000 )anki_fit_forgetting_curve( path = NULL, profile = NULL, cid = NULL, min_reviews = 5, max_cards = 1000 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
cid |
Optional card ID for individual card analysis |
min_reviews |
Minimum reviews required for analysis (default 5) |
max_cards |
Maximum cards to analyze for aggregate (default 1000) |
A list with fitted curve parameters and comparison data
## Not run: curve <- anki_fit_forgetting_curve() plot(curve$data$days_elapsed, curve$data$observed_retention, type = "p") lines(curve$data$days_elapsed, curve$data$fitted_retention, col = "blue") ## End(Not run)## Not run: curve <- anki_fit_forgetting_curve() plot(curve$data$days_elapsed, curve$data$observed_retention, type = "p") lines(curve$data$days_elapsed, curve$data$fitted_retention, col = "blue") ## End(Not run)
Predicts how many reviews will be due each day.
anki_forecast(path = NULL, profile = NULL, days = 30)anki_forecast(path = NULL, profile = NULL, days = 30)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to forecast (default 30) |
A tibble with daily forecast
## Not run: forecast <- anki_forecast() ## End(Not run)## Not run: forecast <- anki_forecast() ## End(Not run)
Improved forecasting with ARIMA, seasonal patterns, and workload ceilings.
anki_forecast_enhanced( path = NULL, profile = NULL, metric = "reviews", days_ahead = 30, method = "auto", confidence = 0.95, workload_ceiling = NULL )anki_forecast_enhanced( path = NULL, profile = NULL, metric = "reviews", days_ahead = 30, method = "auto", confidence = 0.95, workload_ceiling = NULL )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
metric |
Metric to forecast: "reviews", "time", "retention", "cards_learned" |
days_ahead |
Number of days to forecast (default 30) |
method |
Forecasting method: "auto", "arima", "ets", "holt", "seasonal" |
confidence |
Confidence level for prediction intervals (default 0.95) |
workload_ceiling |
Maximum daily workload (NULL for none) |
A tibble with forecast results
## Not run: fc <- anki_forecast_enhanced("reviews", days_ahead = 30) plot(fc$date, fc$forecast, type = "l") ## End(Not run)## Not run: fc <- anki_forecast_enhanced("reviews", days_ahead = 30) plot(fc$date, fc$forecast, type = "l") ## End(Not run)
Forecast future reviews using Monte Carlo simulation with bootstrapping. Unlike statistical methods (ARIMA, Holt-Winters), this approach:
Makes no distributional assumptions
Preserves day-of-week patterns naturally
Handles irregular study habits (missed days, catch-up sessions)
Provides empirical confidence intervals
anki_forecast_monte_carlo( path = NULL, profile = NULL, days_ahead = 30, n_sim = 1000, method = "weekday", block_size = 7, include_trend = TRUE, seed = NULL )anki_forecast_monte_carlo( path = NULL, profile = NULL, days_ahead = 30, n_sim = 1000, method = "weekday", block_size = 7, include_trend = TRUE, seed = NULL )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days_ahead |
Number of days to forecast (default 30) |
n_sim |
Number of simulations (default 1000) |
method |
Bootstrap method: "weekday" (preserves day-of-week), "block" (preserves sequences), "simple" (iid sampling) |
block_size |
Block size for block bootstrap (default 7) |
include_trend |
Whether to include trend component (default TRUE) |
seed |
Random seed for reproducibility (NULL for random) |
A list with forecast distribution, summary statistics, and simulation data
## Not run: mc <- anki_forecast_monte_carlo(days_ahead = 30, n_sim = 1000) # Summary mc$summary # Probability of >100 reviews on day 7 mc$prob_above(day = 7, threshold = 100) # Full simulation matrix dim(mc$simulations) # n_sim x days_ahead ## End(Not run)## Not run: mc <- anki_forecast_monte_carlo(days_ahead = 30, n_sim = 1000) # Summary mc$summary # Probability of >100 reviews on day 7 mc$prob_above(day = 7, threshold = 100) # Full simulation matrix dim(mc$simulations) # n_sim x days_ahead ## End(Not run)
Calculate XP, level, achievements, and progress toward goals based on your Anki review history. Makes studying more engaging!
anki_gamification( path = NULL, profile = NULL, xp_per_review = 10, xp_per_correct = 5, xp_per_streak = 25 )anki_gamification( path = NULL, profile = NULL, xp_per_review = 10, xp_per_correct = 5, xp_per_streak = 25 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
xp_per_review |
XP awarded per review (default 10) |
xp_per_correct |
Bonus XP for correct answer (default 5) |
xp_per_streak |
Bonus XP per day of streak (default 25) |
A list with XP, level, achievements, and stats
## Not run: stats <- anki_gamification() stats$level stats$achievements ## End(Not run)## Not run: stats <- anki_gamification() stats$level stats$achievements ## End(Not run)
Performs a comprehensive health check on your Anki collection, identifying common issues and problems.
anki_health_check(path = NULL, profile = NULL)anki_health_check(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with health check results
## Not run: health <- anki_health_check() ## End(Not run)## Not run: health <- anki_health_check() ## End(Not run)
Get review data formatted for calendar heatmaps
anki_heatmap_data(path = NULL, profile = NULL, year = NULL)anki_heatmap_data(path = NULL, profile = NULL, year = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
year |
Optional year to filter (NULL for all) |
A tibble with date and count columns suitable for heatmap visualization
## Not run: heatmap_data <- anki_heatmap_data() # Use with ggplot2: # ggplot(heatmap_data, aes(week, weekday, fill = reviews)) + geom_tile() ## End(Not run)## Not run: heatmap_data <- anki_heatmap_data() # Use with ggplot2: # ggplot(heatmap_data, aes(week, weekday, fill = reviews)) + geom_tile() ## End(Not run)
Find cards that are often confused with each other, based on similar failure patterns or content similarity combined with poor retention.
anki_interference_analysis( path = NULL, profile = NULL, min_lapses = 3, time_window_days = 7, max_pairs = 50 )anki_interference_analysis( path = NULL, profile = NULL, min_lapses = 3, time_window_days = 7, max_pairs = 50 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
min_lapses |
Minimum lapses for a card to be considered (default 3) |
time_window_days |
Window to look for related failures (default 7) |
max_pairs |
Maximum pairs to return (default 50) |
A tibble of potentially interfering card pairs
## Not run: interference <- anki_interference_analysis() ## End(Not run)## Not run: interference <- anki_interference_analysis() ## End(Not run)
Shows how cards have progressed through intervals over time.
anki_learning_curve( path = NULL, profile = NULL, card_ids = NULL, n_cards = 100 )anki_learning_curve( path = NULL, profile = NULL, card_ids = NULL, n_cards = 100 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
card_ids |
Optional vector of card IDs to track (NULL for sample) |
n_cards |
Number of cards to sample if card_ids is NULL |
A tibble with review history per card
## Not run: curve <- anki_learning_curve() ## End(Not run)## Not run: curve <- anki_learning_curve() ## End(Not run)
Calculate how much "real learning" is happening vs time spent on failed reviews. Measures the ratio of successful retention to total study time.
anki_learning_efficiency( path = NULL, profile = NULL, days = 30, by_deck = FALSE )anki_learning_efficiency( path = NULL, profile = NULL, days = 30, by_deck = FALSE )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to analyze (default 30, NULL for all) |
by_deck |
If TRUE, calculate efficiency per deck |
A tibble with efficiency metrics
## Not run: eff <- anki_learning_efficiency() eff <- anki_learning_efficiency(days = 90, by_deck = TRUE) ## End(Not run)## Not run: eff <- anki_learning_efficiency() eff <- anki_learning_efficiency(days = 90, by_deck = TRUE) ## End(Not run)
Track learning rate over time: cards learned per day, time to graduation, acceleration or deceleration of learning.
anki_learning_velocity(path = NULL, profile = NULL, period = "month")anki_learning_velocity(path = NULL, profile = NULL, period = "month")
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
period |
Analysis period: "week", "month", "quarter", "all" (default "month") |
A list with velocity metrics and trends
## Not run: velocity <- anki_learning_velocity() velocity$current velocity$trend ## End(Not run)## Not run: velocity <- anki_learning_velocity() velocity$current velocity$trend ## End(Not run)
Leeches are cards that you keep forgetting. By default, Anki marks cards as leeches after 8 lapses.
anki_leeches(path = NULL, profile = NULL, threshold = 8, include_notes = FALSE)anki_leeches(path = NULL, profile = NULL, threshold = 8, include_notes = FALSE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
threshold |
Minimum number of lapses to consider a leech (default 8) |
include_notes |
If TRUE, join with note data |
A tibble of leech cards ordered by lapses
## Not run: leeches <- anki_leeches() leeches <- anki_leeches(threshold = 5) ## End(Not run)## Not run: leeches <- anki_leeches() leeches <- anki_leeches(threshold = 5) ## End(Not run)
Identifies cards that might be too complex.
anki_long_cards(path = NULL, profile = NULL, threshold = 2000)anki_long_cards(path = NULL, profile = NULL, threshold = 2000)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
threshold |
Character count threshold (default 2000) |
A tibble of long cards
## Not run: long_cards <- anki_long_cards() ## End(Not run)## Not run: long_cards <- anki_long_cards() ## End(Not run)
Get mature cards (interval >= 21 days)
anki_mature(path = NULL, profile = NULL, min_interval = 21)anki_mature(path = NULL, profile = NULL, min_interval = 21)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
min_interval |
Minimum interval to consider mature (default 21) |
A tibble of mature cards
## Not run: mature <- anki_mature() ## End(Not run)## Not run: mature <- anki_mature() ## End(Not run)
Returns all media files stored in the collection's media folder.
anki_media_list(path = NULL, profile = NULL)anki_media_list(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with filename, size, and extension
## Not run: media <- anki_media_list() ## End(Not run)## Not run: media <- anki_media_list() ## End(Not run)
Identifies media files referenced in notes but not present in the media folder.
anki_media_missing(path = NULL, profile = NULL)anki_media_missing(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with missing filenames and the notes referencing them
## Not run: missing <- anki_media_missing() ## End(Not run)## Not run: missing <- anki_media_missing() ## End(Not run)
Get media folder path
anki_media_path(path = NULL, profile = NULL)anki_media_path(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
Character string path to collection.media folder
## Not run: anki_media_path() ## End(Not run)## Not run: anki_media_path() ## End(Not run)
Get media statistics
anki_media_stats(path = NULL, profile = NULL)anki_media_stats(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with media statistics
## Not run: stats <- anki_media_stats() ## End(Not run)## Not run: stats <- anki_media_stats() ## End(Not run)
Identifies media files that are not referenced in any note.
anki_media_unused(path = NULL, profile = NULL)anki_media_unused(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of unused media files
## Not run: unused <- anki_media_unused() ## End(Not run)## Not run: unused <- anki_media_unused() ## End(Not run)
Read note types (models) from Anki collection
anki_models(path = NULL, profile = NULL)anki_models(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of note types with columns: mid, name, flds (list of field names), tmpls (list of template names)
## Not run: anki_models() ## End(Not run)## Not run: anki_models() ## End(Not run)
Get monthly summary statistics
anki_monthly_summary(path = NULL, profile = NULL, months = 12)anki_monthly_summary(path = NULL, profile = NULL, months = 12)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
months |
Number of months to include (default 12) |
A tibble with monthly statistics
## Not run: anki_monthly_summary() ## End(Not run)## Not run: anki_monthly_summary() ## End(Not run)
Get new cards (never reviewed)
anki_new(path = NULL, profile = NULL, deck = NULL)anki_new(path = NULL, profile = NULL, deck = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
deck |
Optional deck name to filter |
A tibble of new cards
## Not run: new_cards <- anki_new() ## End(Not run)## Not run: new_cards <- anki_new() ## End(Not run)
Read notes from Anki collection
anki_notes(path = NULL, profile = NULL)anki_notes(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of notes with columns: nid, mid, tags, flds, sfld
## Not run: anki_notes() ## End(Not run)## Not run: anki_notes() ## End(Not run)
Histogram of card difficulties (FSRS).
anki_plot_difficulty(path = NULL, profile = NULL, by_deck = FALSE)anki_plot_difficulty(path = NULL, profile = NULL, by_deck = FALSE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by_deck |
If TRUE, facet by deck |
A ggplot2 object
## Not run: anki_plot_difficulty() ## End(Not run)## Not run: anki_plot_difficulty() ## End(Not run)
Shows predicted upcoming review workload.
anki_plot_forecast(path = NULL, profile = NULL, days = 30)anki_plot_forecast(path = NULL, profile = NULL, days = 30)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to forecast (default 30) |
A ggplot2 object
## Not run: anki_plot_forecast() ## End(Not run)## Not run: anki_plot_forecast() ## End(Not run)
Creates a visualization comparing your fitted forgetting curve to FSRS defaults.
anki_plot_forgetting_curve(curve_data)anki_plot_forgetting_curve(curve_data)
curve_data |
Output from anki_fit_forgetting_curve() |
A ggplot object
## Not run: curve <- anki_fit_forgetting_curve() anki_plot_forgetting_curve(curve) ## End(Not run)## Not run: curve <- anki_fit_forgetting_curve() anki_plot_forgetting_curve(curve) ## End(Not run)
Creates a calendar heatmap showing review activity.
anki_plot_heatmap( path = NULL, profile = NULL, year = NULL, colors = c("#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39") )anki_plot_heatmap( path = NULL, profile = NULL, year = NULL, colors = c("#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39") )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
year |
Year to display (default: current year) |
colors |
Vector of colors for the gradient (low to high) |
A ggplot2 object
## Not run: anki_plot_heatmap() anki_plot_heatmap(year = 2024) ## End(Not run)## Not run: anki_plot_heatmap() anki_plot_heatmap(year = 2024) ## End(Not run)
Plot reviews by hour of day
anki_plot_hours(path = NULL, profile = NULL, days = 90)anki_plot_hours(path = NULL, profile = NULL, days = 90)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to include |
A ggplot2 object
## Not run: anki_plot_hours() ## End(Not run)## Not run: anki_plot_hours() ## End(Not run)
Histogram of card intervals.
anki_plot_intervals(path = NULL, profile = NULL, log_scale = TRUE)anki_plot_intervals(path = NULL, profile = NULL, log_scale = TRUE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
log_scale |
If TRUE, use log scale for x-axis |
A ggplot2 object
## Not run: anki_plot_intervals() ## End(Not run)## Not run: anki_plot_intervals() ## End(Not run)
Visualize Monte Carlo forecast with confidence bands.
anki_plot_monte_carlo( mc_forecast, show_bands = c("95", "80"), show_simulations = 20, cumulative = FALSE )anki_plot_monte_carlo( mc_forecast, show_bands = c("95", "80"), show_simulations = 20, cumulative = FALSE )
mc_forecast |
Output from anki_forecast_monte_carlo() |
show_bands |
Confidence bands to show: "95", "80", "50", or combinations |
show_simulations |
Number of individual simulations to overlay (0 for none) |
cumulative |
Plot cumulative reviews instead of daily |
A ggplot2 object
## Not run: mc <- anki_forecast_monte_carlo(days_ahead = 30) anki_plot_monte_carlo(mc) anki_plot_monte_carlo(mc, cumulative = TRUE) ## End(Not run)## Not run: mc <- anki_forecast_monte_carlo(days_ahead = 30) anki_plot_monte_carlo(mc) anki_plot_monte_carlo(mc, cumulative = TRUE) ## End(Not run)
Shows how retention rate has changed over time.
anki_plot_retention(path = NULL, profile = NULL, days = 90, window = 7)anki_plot_retention(path = NULL, profile = NULL, days = 90, window = 7)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to include (default 90) |
window |
Rolling window size in days for smoothing (default 7) |
A ggplot2 object
## Not run: anki_plot_retention() anki_plot_retention(days = 365, window = 14) ## End(Not run)## Not run: anki_plot_retention() anki_plot_retention(days = 365, window = 14) ## End(Not run)
Histogram of FSRS stability values.
anki_plot_stability(path = NULL, profile = NULL)anki_plot_stability(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A ggplot2 object
## Not run: anki_plot_stability() ## End(Not run)## Not run: anki_plot_stability() ## End(Not run)
Plot reviews by day of week
anki_plot_weekdays(path = NULL, profile = NULL, days = 90)anki_plot_weekdays(path = NULL, profile = NULL, days = 90)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to include |
A ggplot2 object
## Not run: anki_plot_weekdays() ## End(Not run)## Not run: anki_plot_weekdays() ## End(Not run)
Returns the names of all Anki profiles found in the Anki2 directory.
anki_profiles(base_path = NULL)anki_profiles(base_path = NULL)
base_path |
Path to Anki2 directory (auto-detected if NULL) |
Character vector of profile names
## Not run: anki_profiles() ## End(Not run)## Not run: anki_profiles() ## End(Not run)
Generates a shareable HTML or Markdown progress report with charts.
anki_progress_report( path = NULL, profile = NULL, output_path = "anki_progress.html", format = "html", period = "month", title = "Anki Progress Report" )anki_progress_report( path = NULL, profile = NULL, output_path = "anki_progress.html", format = "html", period = "month", title = "Anki Progress Report" )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
output_path |
Path for output file |
format |
Output format: "html" or "markdown" |
period |
Period to analyze: "week", "month", "year" |
title |
Report title |
Invisibly returns the report content
## Not run: anki_progress_report(output_path = "my_progress.html", period = "month") ## End(Not run)## Not run: anki_progress_report(output_path = "my_progress.html", period = "month") ## End(Not run)
Comprehensive quality analysis combining multiple metrics.
anki_quality_report(path = NULL, profile = NULL)anki_quality_report(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with quality metrics
## Not run: quality <- anki_quality_report() ## End(Not run)## Not run: quality <- anki_quality_report() ## End(Not run)
Get a one-liner overview of your Anki collection.
anki_quick_summary(path = NULL, profile = NULL, print = TRUE)anki_quick_summary(path = NULL, profile = NULL, print = TRUE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
print |
Whether to print the summary (default TRUE) |
Invisibly returns a list with summary stats
## Not run: anki_quick_summary() ## End(Not run)## Not run: anki_quick_summary() ## End(Not run)
Creates a summary of your Anki collection statistics.
anki_report(path = NULL, profile = NULL)anki_report(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with collection statistics
## Not run: report <- anki_report() print(report) ## End(Not run)## Not run: report <- anki_report() print(report) ## End(Not run)
Shows how response time varies by difficulty, interval, etc.
anki_response_time(path = NULL, profile = NULL, days = 90)anki_response_time(path = NULL, profile = NULL, days = 90)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to analyze |
A tibble with response time analysis
## Not run: anki_response_time() ## End(Not run)## Not run: anki_response_time() ## End(Not run)
Find reviews with suspicious response times (too fast or too slow).
anki_response_time_outliers( path = NULL, profile = NULL, min_time_ms = 500, max_time_ms = 120000 )anki_response_time_outliers( path = NULL, profile = NULL, min_time_ms = 500, max_time_ms = 120000 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
min_time_ms |
Minimum expected time in ms (default 500) |
max_time_ms |
Maximum expected time in ms (default 120000 = 2 min) |
A tibble with outlier reviews
## Not run: outliers <- anki_response_time_outliers() ## End(Not run)## Not run: outliers <- anki_response_time_outliers() ## End(Not run)
Break down retention by card characteristics: cloze vs basic, with/without media, short vs long content.
anki_retention_by_type(path = NULL, profile = NULL, days = 30)anki_retention_by_type(path = NULL, profile = NULL, days = 30)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to analyze (default 30) |
A list with retention breakdowns by different content types
## Not run: ret_type <- anki_retention_by_type() ret_type$by_card_type ret_type$by_media ## End(Not run)## Not run: ret_type <- anki_retention_by_type() ret_type$by_card_type ret_type$by_media ## End(Not run)
Calculates the proportion of reviews that were successful (not "Again").
anki_retention_rate( path = NULL, profile = NULL, days = 30, by_deck = FALSE, queue_only = TRUE )anki_retention_rate( path = NULL, profile = NULL, days = 30, by_deck = FALSE, queue_only = TRUE )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to look back (default 30, NULL for all) |
by_deck |
If TRUE, calculate retention per deck |
queue_only |
If TRUE (default), only count reviews from the review
queue ( |
A tibble with retention statistics
## Not run: retention <- anki_retention_rate() retention <- anki_retention_rate(days = 90, by_deck = TRUE) ## End(Not run)## Not run: retention <- anki_retention_rate() retention <- anki_retention_rate(days = 90, by_deck = TRUE) ## End(Not run)
Analyze how stable your retention is over time.
anki_retention_stability(path = NULL, profile = NULL, window = 7)anki_retention_stability(path = NULL, profile = NULL, window = 7)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
window |
Rolling window size in days (default 7) |
A tibble with retention stability metrics
Detects low-quality reviews: pattern clicking, rushed reviews, suspicious timing patterns, and other indicators of disengaged studying.
anki_review_quality( path = NULL, profile = NULL, days = 30, min_time_ms = 800, max_time_ms = 60000 )anki_review_quality( path = NULL, profile = NULL, days = 30, min_time_ms = 800, max_time_ms = 60000 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to analyze (default 30) |
min_time_ms |
Minimum expected review time in ms (default 800) |
max_time_ms |
Maximum expected review time in ms (default 60000) |
A list with quality metrics and flagged reviews
## Not run: quality <- anki_review_quality() quality$score quality$issues ## End(Not run)## Not run: quality <- anki_review_quality() quality$score quality$issues ## End(Not run)
Read review log from Anki collection
anki_revlog(path = NULL, profile = NULL)anki_revlog(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of review log entries with columns: rid, cid, ease, ivl, time, review_date
## Not run: anki_revlog() ## End(Not run)## Not run: anki_revlog() ## End(Not run)
Estimate the return on investment of your spaced repetition practice. Calculates knowledge half-life extension per minute of study.
anki_roi_analysis(path = NULL, profile = NULL)anki_roi_analysis(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with ROI analysis
## Not run: roi <- anki_roi_analysis() ## End(Not run)## Not run: roi <- anki_roi_analysis() ## End(Not run)
Detect the Anki database schema version to help debug compatibility issues.
anki_schema_version(path = NULL, profile = NULL)anki_schema_version(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with schema information
## Not run: schema <- anki_schema_version() ## End(Not run)## Not run: schema <- anki_schema_version() ## End(Not run)
Searches cards using a simplified version of Anki's search syntax. Supports: deck:name, tag:name, is:new, is:due, is:suspended, is:buried, is:learn, is:review, prop:ivl>N, prop:lapses>N, prop:reps>N
anki_search(query, path = NULL, profile = NULL)anki_search(query, path = NULL, profile = NULL)
query |
Search query string |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble of matching cards
## Not run: # Find suspended cards anki_search("is:suspended") # Find cards in a specific deck anki_search("deck:Default") # Find cards with many lapses anki_search("prop:lapses>5") # Combine conditions anki_search("deck:Medical is:review prop:ivl>30") ## End(Not run)## Not run: # Find suspended cards anki_search("is:suspended") # Find cards in a specific deck anki_search("deck:Default") # Find cards with many lapses anki_search("prop:lapses>5") # Combine conditions anki_search("deck:Medical is:review prop:ivl>30") ## End(Not run)
Advanced search functionality supporting additional search operators beyond
the basic anki_search().
anki_search_enhanced( pattern, path = NULL, profile = NULL, case_sensitive = FALSE )anki_search_enhanced( pattern, path = NULL, profile = NULL, case_sensitive = FALSE )
pattern |
Search pattern with support for advanced operators |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
case_sensitive |
Whether search is case-sensitive (default FALSE) |
Supported search operators:
added:N - Cards added in last N days
rated:N - Cards rated in last N days
rated:N:ease - Cards rated with specific ease (1-4) in last N days
note:type - Cards with specific note type name
card:N - Card template number (0-indexed)
ivl:N - Cards with interval >= N days
ivl:<N - Cards with interval < N days
prop:ease>N - Cards with ease factor > N (e.g., prop:ease>2.5)
prop:lapses>N - Cards with lapses > N
prop:reps>N - Cards with reps > N
re:pattern - Regex search in card content
OR - OR operator between terms
Standard operators: deck:, tag:, is:, flag:
A tibble with matching cards
## Not run: # Cards added in last 7 days anki_search_enhanced("added:7") # Cards rated "Again" in last 3 days anki_search_enhanced("rated:3:1") # Leeches with high lapses anki_search_enhanced("is:leech prop:lapses>5") # Regex search anki_search_enhanced("re:^The\\s+") # OR search anki_search_enhanced("deck:German OR deck:Spanish") ## End(Not run)## Not run: # Cards added in last 7 days anki_search_enhanced("added:7") # Cards rated "Again" in last 3 days anki_search_enhanced("rated:3:1") # Leeches with high lapses anki_search_enhanced("is:leech prop:lapses>5") # Regex search anki_search_enhanced("re:^The\\s+") # OR search anki_search_enhanced("deck:German OR deck:Spanish") ## End(Not run)
Identifies and analyzes discrete study sessions based on gaps between reviews.
anki_session_analysis( path = NULL, profile = NULL, gap_minutes = 30, min_session_reviews = 5 )anki_session_analysis( path = NULL, profile = NULL, gap_minutes = 30, min_session_reviews = 5 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
gap_minutes |
Gap in minutes to consider a new session (default 30) |
min_session_reviews |
Minimum reviews to count as a session (default 5) |
A list with session analysis
## Not run: sessions <- anki_session_analysis() ## End(Not run)## Not run: sessions <- anki_session_analysis() ## End(Not run)
Identifies study sessions and calculates session statistics. A session is defined as reviews with gaps less than session_gap minutes.
anki_session_stats(path = NULL, profile = NULL, session_gap = 30, days = 90)anki_session_stats(path = NULL, profile = NULL, session_gap = 30, days = 90)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
session_gap |
Gap in minutes that defines session boundaries (default 30) |
days |
Number of days to analyze |
A tibble with session statistics
## Not run: sessions <- anki_session_stats() ## End(Not run)## Not run: sessions <- anki_session_stats() ## End(Not run)
Analyzes how sibling cards (cards from the same note) affect each other's retention. For example, does seeing the forward card help with the reverse?
anki_sibling_analysis(path = NULL, profile = NULL, max_gap_days = 7)anki_sibling_analysis(path = NULL, profile = NULL, max_gap_days = 7)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
max_gap_days |
Maximum days between sibling reviews to consider related (default 7) |
A list with sibling analysis
## Not run: siblings <- anki_sibling_analysis() ## End(Not run)## Not run: siblings <- anki_sibling_analysis() ## End(Not run)
Uses text similarity to find potential duplicate cards.
anki_similar_cards( path = NULL, profile = NULL, threshold = 0.8, max_comparisons = 50000 )anki_similar_cards( path = NULL, profile = NULL, threshold = 0.8, max_comparisons = 50000 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
threshold |
Similarity threshold (0-1, default 0.8) |
max_comparisons |
Maximum number of comparisons (default 50000) |
A tibble of similar card pairs
## Not run: dupes <- anki_similar_cards(threshold = 0.9) ## End(Not run)## Not run: dupes <- anki_similar_cards(threshold = 0.9) ## End(Not run)
Given a time budget, predict how many cards you'll review, expected retention, and workload distribution.
anki_simulate_session( path = NULL, profile = NULL, minutes = 30, include_new = TRUE )anki_simulate_session( path = NULL, profile = NULL, minutes = 30, include_new = TRUE )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
minutes |
Available study time in minutes (default 30) |
include_new |
Whether to include new cards (default TRUE) |
A tibble with session simulation
## Not run: sim <- anki_simulate_session(minutes = 30) ## End(Not run)## Not run: sim <- anki_simulate_session(minutes = 30) ## End(Not run)
Calculate daily review statistics
anki_stats_daily(path = NULL, profile = NULL, from = NULL, to = NULL)anki_stats_daily(path = NULL, profile = NULL, from = NULL, to = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
from |
Optional start date (Date or character "YYYY-MM-DD") |
to |
Optional end date (Date or character "YYYY-MM-DD") |
A tibble with daily statistics
## Not run: daily <- anki_stats_daily() daily <- anki_stats_daily(from = "2024-01-01") ## End(Not run)## Not run: daily <- anki_stats_daily() daily <- anki_stats_daily(from = "2024-01-01") ## End(Not run)
Calculate per-deck statistics
anki_stats_deck(path = NULL, profile = NULL)anki_stats_deck(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with deck statistics
## Not run: stats <- anki_stats_deck() ## End(Not run)## Not run: stats <- anki_stats_deck() ## End(Not run)
Calculate current review streak
anki_streak(path = NULL, profile = NULL)anki_streak(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with current_streak, longest_streak, and streak_history
## Not run: streak <- anki_streak() streak$current_streak streak$longest_streak ## End(Not run)## Not run: streak <- anki_streak() streak$current_streak streak$longest_streak ## End(Not run)
Detailed streak analysis including best streaks, recovery time after breaks, weekend vs weekday patterns, and streak predictions.
anki_streak_analytics(path = NULL, profile = NULL)anki_streak_analytics(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with detailed streak statistics
## Not run: streaks <- anki_streak_analytics() streaks$current streaks$history ## End(Not run)## Not run: streaks <- anki_streak_analytics() streaks$current streaks$history ## End(Not run)
Generates a daily study plan based on exam date and current progress.
anki_study_plan( path = NULL, profile = NULL, target_date, daily_minutes = 60, deck_pattern = NULL )anki_study_plan( path = NULL, profile = NULL, target_date, daily_minutes = 60, deck_pattern = NULL )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
target_date |
Exam/target date |
daily_minutes |
Available study time per day in minutes (default 60) |
deck_pattern |
Optional pattern to filter decks |
A list with study plan
## Not run: plan <- anki_study_plan(target_date = "2024-06-15", daily_minutes = 90) ## End(Not run)## Not run: plan <- anki_study_plan(target_date = "2024-06-15", daily_minutes = 90) ## End(Not run)
Identifies which topics/decks should be prioritized based on progress and retention.
anki_study_priorities(path = NULL, profile = NULL, by = "tag", n = 10)anki_study_priorities(path = NULL, profile = NULL, by = "tag", n = 10)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Analysis type: "tag" or "deck" (default "tag") |
n |
Number of priority topics to return (default 10) |
A tibble with prioritized topics
## Not run: priorities <- anki_study_priorities(n = 10) ## End(Not run)## Not run: priorities <- anki_study_priorities(n = 10) ## End(Not run)
Returns a one-liner overview of your Anki collection.
anki_summary(path = NULL, profile = NULL)anki_summary(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with key metrics
## Not run: anki_summary() ## End(Not run)## Not run: anki_summary() ## End(Not run)
Get suspended cards
anki_suspended(path = NULL, profile = NULL, include_notes = FALSE)anki_suspended(path = NULL, profile = NULL, include_notes = FALSE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
include_notes |
If TRUE, join with note data |
A tibble of suspended cards
## Not run: suspended <- anki_suspended() ## End(Not run)## Not run: suspended <- anki_suspended() ## End(Not run)
Provides detailed tag statistics and identifies orphan/unused tags.
anki_tag_analysis(path = NULL, profile = NULL)anki_tag_analysis(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with tag analysis
## Not run: tags <- anki_tag_analysis() ## End(Not run)## Not run: tags <- anki_tag_analysis() ## End(Not run)
Parses tags from all notes and returns unique tags with their frequency.
anki_tags(path = NULL, profile = NULL)anki_tags(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with columns: tag, count
## Not run: tags <- anki_tags() ## End(Not run)## Not run: tags <- anki_tags() ## End(Not run)
Shows when you study most during the day.
anki_time_by_hour(path = NULL, profile = NULL, days = 90)anki_time_by_hour(path = NULL, profile = NULL, days = 90)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to analyze (NULL for all) |
A tibble with hourly statistics
## Not run: anki_time_by_hour() ## End(Not run)## Not run: anki_time_by_hour() ## End(Not run)
Shows which days you study most.
anki_time_by_weekday(path = NULL, profile = NULL, days = 90)anki_time_by_weekday(path = NULL, profile = NULL, days = 90)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to analyze (NULL for all) |
A tibble with daily statistics
## Not run: anki_time_by_weekday() ## End(Not run)## Not run: anki_time_by_weekday() ## End(Not run)
Converts Anki's millisecond-epoch timestamps to Date objects.
anki_timestamp_to_date(x)anki_timestamp_to_date(x)
x |
Numeric timestamp in milliseconds since Unix epoch (1970-01-01) |
Date object
# Convert a typical Anki timestamp anki_timestamp_to_date(1368291917470)# Convert a typical Anki timestamp anki_timestamp_to_date(1368291917470)
Converts Anki's millisecond-epoch timestamps to POSIXct datetime objects.
anki_timestamp_to_datetime(x)anki_timestamp_to_datetime(x)
x |
Numeric timestamp in milliseconds since Unix epoch (1970-01-01) |
POSIXct datetime object in local timezone
# Convert a typical Anki timestamp anki_timestamp_to_datetime(1368291917470)# Convert a typical Anki timestamp anki_timestamp_to_datetime(1368291917470)
Exports cards from a deck to a CSV file with note content.
anki_to_csv( deck, file = NULL, path = NULL, profile = NULL, include_html = FALSE )anki_to_csv( deck, file = NULL, path = NULL, profile = NULL, include_html = FALSE )
deck |
Deck name or ID (partial match supported) |
file |
Output file path (default: deck name + .csv) |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
include_html |
If FALSE, strip HTML tags from fields |
Invisibly returns the exported data
## Not run: anki_to_csv("Default") anki_to_csv("Medical", file = "medical_cards.csv") ## End(Not run)## Not run: anki_to_csv("Default") anki_to_csv("Medical", file = "medical_cards.csv") ## End(Not run)
Export collection report to HTML
anki_to_html(file, path = NULL, profile = NULL)anki_to_html(file, path = NULL, profile = NULL)
file |
Output HTML file path |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
Invisibly returns the file path
## Not run: anki_to_html("report.html") ## End(Not run)## Not run: anki_to_html("report.html") ## End(Not run)
Full collection export as structured JSON for web dashboards or custom apps.
anki_to_json( path = NULL, profile = NULL, output_path = "anki_collection.json", include_revlog = TRUE, include_content = TRUE )anki_to_json( path = NULL, profile = NULL, output_path = "anki_collection.json", include_revlog = TRUE, include_content = TRUE )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
output_path |
Path for output JSON file |
include_revlog |
Whether to include review log (can be large) |
include_content |
Whether to include card content |
Invisibly returns the exported data structure
## Not run: anki_to_json(output_path = "collection.json") ## End(Not run)## Not run: anki_to_json(output_path = "collection.json") ## End(Not run)
Exports cards to Markdown flashcard format.
anki_to_markdown( deck, file = NULL, path = NULL, profile = NULL, format = c("obsidian", "logseq", "basic") )anki_to_markdown( deck, file = NULL, path = NULL, profile = NULL, format = c("obsidian", "logseq", "basic") )
deck |
Deck name or ID |
file |
Output file path |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
format |
Format: "obsidian", "logseq", or "basic" |
Invisibly returns the number of cards exported
## Not run: anki_to_markdown("Medical") ## End(Not run)## Not run: anki_to_markdown("Medical") ## End(Not run)
Exports cards to Mochi's JSON import format.
anki_to_mochi( path = NULL, profile = NULL, output_path = "mochi_cards.json", deck_pattern = NULL )anki_to_mochi( path = NULL, profile = NULL, output_path = "mochi_cards.json", deck_pattern = NULL )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
output_path |
Path for output JSON file |
deck_pattern |
Optional pattern to filter decks |
Invisibly returns the number of cards exported
## Not run: anki_to_mochi(output_path = "mochi_import.json") ## End(Not run)## Not run: anki_to_mochi(output_path = "mochi_import.json") ## End(Not run)
Exports cards in a format compatible with the Obsidian Spaced Repetition plugin.
anki_to_obsidian_sr( path = NULL, profile = NULL, output_dir = ".", model_id = NULL, deck_pattern = NULL, include_scheduling = FALSE )anki_to_obsidian_sr( path = NULL, profile = NULL, output_dir = ".", model_id = NULL, deck_pattern = NULL, include_scheduling = FALSE )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
output_dir |
Directory for output files (default: current directory) |
model_id |
Optional model ID to export (NULL for all) |
deck_pattern |
Optional pattern to filter decks |
include_scheduling |
Include scheduling info as YAML frontmatter |
Invisibly returns the number of cards exported
## Not run: anki_to_obsidian_sr(output_dir = "~/obsidian/vault/flashcards") ## End(Not run)## Not run: anki_to_obsidian_sr(output_dir = "~/obsidian/vault/flashcards") ## End(Not run)
Exports cards to Emacs Org-mode flashcard format (org-drill compatible).
anki_to_org( deck, file = NULL, path = NULL, profile = NULL, include_scheduling = FALSE )anki_to_org( deck, file = NULL, path = NULL, profile = NULL, include_scheduling = FALSE )
deck |
Deck name or ID |
file |
Output file path (default: deck name + .org) |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
include_scheduling |
If TRUE, include scheduling data as properties |
Invisibly returns the number of cards exported
## Not run: anki_to_org("Medical") anki_to_org("Vocabulary", file = "vocab.org") ## End(Not run)## Not run: anki_to_org("Medical") anki_to_org("Vocabulary", file = "vocab.org") ## End(Not run)
Export deck to SuperMemo Q&A format
anki_to_supermemo(deck, file = NULL, path = NULL, profile = NULL)anki_to_supermemo(deck, file = NULL, path = NULL, profile = NULL)
deck |
Deck name or ID |
file |
Output file path |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
Invisibly returns the number of cards exported
## Not run: anki_to_supermemo("Medical") ## End(Not run)## Not run: anki_to_supermemo("Medical") ## End(Not run)
Returns what happened today in your Anki studies.
Detailed breakdown of today's Anki activity.
anki_today(path = NULL, profile = NULL) anki_today(path = NULL, profile = NULL)anki_today(path = NULL, profile = NULL) anki_today(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with today's stats
A list with today's activity breakdown
## Not run: anki_today() ## End(Not run) ## Not run: anki_today() ## End(Not run)## Not run: anki_today() ## End(Not run) ## Not run: anki_today() ## End(Not run)
Identifies unusual days (very high or low activity).
anki_ts_anomalies(path = NULL, profile = NULL, threshold = 2)anki_ts_anomalies(path = NULL, profile = NULL, threshold = 2)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
threshold |
Number of standard deviations for anomaly (default 2) |
A tibble with anomalous days
## Not run: anomalies <- anki_ts_anomalies() ## End(Not run)## Not run: anomalies <- anki_ts_anomalies() ## End(Not run)
Identifies cyclical patterns in studying.
anki_ts_autocorrelation(path = NULL, profile = NULL, max_lag = 30)anki_ts_autocorrelation(path = NULL, profile = NULL, max_lag = 30)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
max_lag |
Maximum lag to compute (default 30) |
A tibble with autocorrelation values
## Not run: acf_data <- anki_ts_autocorrelation() # Peaks at lag 7 indicate weekly patterns ## End(Not run)## Not run: acf_data <- anki_ts_autocorrelation() # Peaks at lag 7 indicate weekly patterns ## End(Not run)
Uses classical decomposition on review data.
anki_ts_decompose( path = NULL, profile = NULL, metric = "reviews", frequency = 7 )anki_ts_decompose( path = NULL, profile = NULL, metric = "reviews", frequency = 7 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
metric |
Metric to decompose: "reviews", "retention", or "time" |
frequency |
Seasonal frequency (default 7 for weekly pattern) |
A decomposition object (or list with components)
## Not run: dec <- anki_ts_decompose() plot(dec) ## End(Not run)## Not run: dec <- anki_ts_decompose() plot(dec) ## End(Not run)
Uses exponential smoothing or linear trend for forecasting.
anki_ts_forecast(path = NULL, profile = NULL, days = 30, method = "linear")anki_ts_forecast(path = NULL, profile = NULL, days = 30, method = "linear")
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to forecast |
method |
Forecasting method: "ets" (exponential smoothing) or "linear" |
A tibble with forecasted values
## Not run: forecast <- anki_ts_forecast(days = 30) ## End(Not run)## Not run: forecast <- anki_ts_forecast(days = 30) ## End(Not run)
Tracks how card intervals change over time periods.
anki_ts_intervals(path = NULL, profile = NULL, by = "week")anki_ts_intervals(path = NULL, profile = NULL, by = "week")
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Aggregation period: "day", "week", or "month" |
A tibble with interval statistics over time
## Not run: ts <- anki_ts_intervals() plot(ts$date, ts$median_ivl, type = "l") ## End(Not run)## Not run: ts <- anki_ts_intervals() plot(ts$date, ts$median_ivl, type = "l") ## End(Not run)
Tracks how many new cards are introduced and learned over time.
anki_ts_learning(path = NULL, profile = NULL, by = "week")anki_ts_learning(path = NULL, profile = NULL, by = "week")
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Aggregation period: "day", "week", or "month" |
A tibble with learning statistics over time
## Not run: ts <- anki_ts_learning() ## End(Not run)## Not run: ts <- anki_ts_learning() ## End(Not run)
Tracks cumulative mature cards over time.
anki_ts_maturation( path = NULL, profile = NULL, by = "week", mature_threshold = 21 )anki_ts_maturation( path = NULL, profile = NULL, by = "week", mature_threshold = 21 )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Aggregation period: "day", "week", or "month" |
mature_threshold |
Days to consider a card mature (default 21) |
A tibble with maturation statistics
## Not run: ts <- anki_ts_maturation() ## End(Not run)## Not run: ts <- anki_ts_maturation() ## End(Not run)
Plot time series with trend line
anki_ts_plot(ts_data, y_col, title = NULL)anki_ts_plot(ts_data, y_col, title = NULL)
ts_data |
A tibble from any anki_ts_* function |
y_col |
Column name to plot on y-axis |
title |
Plot title |
A ggplot object
## Not run: ts <- anki_ts_intervals() anki_ts_plot(ts, "median_ivl", "Median Interval Over Time") ## End(Not run)## Not run: ts <- anki_ts_intervals() anki_ts_plot(ts, "median_ivl", "Median Interval Over Time") ## End(Not run)
Tracks retention rate changes over time periods.
anki_ts_retention(path = NULL, profile = NULL, by = "week")anki_ts_retention(path = NULL, profile = NULL, by = "week")
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Aggregation period: "day", "week", or "month" |
A tibble with retention statistics over time
## Not run: ts <- anki_ts_retention() ## End(Not run)## Not run: ts <- anki_ts_retention() ## End(Not run)
Tracks how memory stability evolves.
anki_ts_stability(path = NULL, profile = NULL, by = "week")anki_ts_stability(path = NULL, profile = NULL, by = "week")
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Aggregation period: "day", "week", or "month" |
A tibble with stability statistics over time
## Not run: ts <- anki_ts_stability() ## End(Not run)## Not run: ts <- anki_ts_stability() ## End(Not run)
Tracks review workload over time.
anki_ts_workload(path = NULL, profile = NULL, by = "week")anki_ts_workload(path = NULL, profile = NULL, by = "week")
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by |
Aggregation period: "day", "week", or "month" |
A tibble with workload statistics over time
## Not run: ts <- anki_ts_workload() ## End(Not run)## Not run: ts <- anki_ts_workload() ## End(Not run)
Identifies tags or subdecks with the lowest retention or highest lapse rates.
anki_weak_areas(path = NULL, profile = NULL, n = 10, by = "tag", days = 90)anki_weak_areas(path = NULL, profile = NULL, n = 10, by = "tag", days = 90)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
n |
Number of weak areas to return (default 10) |
by |
Analysis type: "tag" or "deck" (default "tag") |
days |
Number of days to analyze (default 90) |
A tibble of weak areas
## Not run: weak <- anki_weak_areas(n = 10, by = "tag") ## End(Not run)## Not run: weak <- anki_weak_areas(n = 10, by = "tag") ## End(Not run)
Project future review workload with scenario analysis. This provides rough ballpark estimates for planning purposes, not accurate FSRS simulation.
anki_workload_projection( path = NULL, profile = NULL, days = 30, scenarios = NULL )anki_workload_projection( path = NULL, profile = NULL, days = 30, scenarios = NULL )
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
days |
Number of days to project (default 30) |
scenarios |
List of scenario parameters |
This function uses simplified heuristics to estimate workload:
New cards reviewed ~4x during learning phase
Mature card reviews based on recent average
Retention affects review frequency
For accurate FSRS simulation, use Anki's built-in simulator (Tools > FSRS > Simulate) or the FSRS Helper add-on, which implement the full FSRS algorithm.
This function is useful for:
Quick "what if" scenario comparisons
Rough planning estimates
Programmatic analysis in R
A tibble with workload projections for each scenario
## Not run: proj <- anki_workload_projection(days = 30) ## End(Not run)## Not run: proj <- anki_workload_projection(days = 30) ## End(Not run)
Converts a Date or POSIXct to Anki's millisecond-epoch format.
date_to_anki_timestamp(x)date_to_anki_timestamp(x)
x |
Date or POSIXct object |
Numeric timestamp in milliseconds since Unix epoch
date_to_anki_timestamp(Sys.Date())date_to_anki_timestamp(Sys.Date())
Compares your optimized FSRS parameters against defaults and community averages.
fsrs_compare_parameters(path = NULL, profile = NULL)fsrs_compare_parameters(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with parameter comparison
## Not run: comp <- fsrs_compare_parameters() ## End(Not run)## Not run: comp <- fsrs_compare_parameters() ## End(Not run)
Computes the current probability of recall for all FSRS-enabled cards.
fsrs_current_retrievability(path = NULL, profile = NULL)fsrs_current_retrievability(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A tibble with cards and their current retrievability
## Not run: r <- fsrs_current_retrievability() # Cards with low retrievability need review soon r[r$retrievability < 0.8, ] ## End(Not run)## Not run: r <- fsrs_current_retrievability() # Cards with low retrievability need review soon r[r$retrievability < 0.8, ] ## End(Not run)
In FSRS-6, each card can have its own decay parameter. This analyzes the distribution across your collection.
fsrs_decay_distribution(path = NULL, profile = NULL, by_deck = FALSE)fsrs_decay_distribution(path = NULL, profile = NULL, by_deck = FALSE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by_deck |
If TRUE, analyze by deck |
A tibble with decay distribution statistics
## Not run: decay <- fsrs_decay_distribution() ## End(Not run)## Not run: decay <- fsrs_decay_distribution() ## End(Not run)
Analyze FSRS difficulty distribution
fsrs_difficulty_distribution(path = NULL, profile = NULL, by_deck = FALSE)fsrs_difficulty_distribution(path = NULL, profile = NULL, by_deck = FALSE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by_deck |
If TRUE, calculate distribution per deck |
A tibble with difficulty statistics
## Not run: diff_dist <- fsrs_difficulty_distribution() ## End(Not run)## Not run: diff_dist <- fsrs_difficulty_distribution() ## End(Not run)
Export reviews for external FSRS analysis
fsrs_export_reviews(file, path = NULL, profile = NULL, format = "csv")fsrs_export_reviews(file, path = NULL, profile = NULL, format = "csv")
file |
Output file path (.csv or .json) |
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
format |
Output format: "csv" or "json" |
Invisibly returns the exported data
## Not run: fsrs_export_reviews("reviews.csv") ## End(Not run)## Not run: fsrs_export_reviews("reviews.csv") ## End(Not run)
Estimates the percentage of cards currently below target retention.
fsrs_forgetting_index(path = NULL, profile = NULL, target_retention = 0.9)fsrs_forgetting_index(path = NULL, profile = NULL, target_retention = 0.9)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
target_retention |
Target retention (default 0.9) |
A list with forgetting analysis
## Not run: fsrs_forgetting_index() ## End(Not run)## Not run: fsrs_forgetting_index() ## End(Not run)
Import review data from CSV for analysis
fsrs_from_csv( file, date_col = "date", rating_col = "rating", card_col = "card_id", date_format = "%Y-%m-%d" )fsrs_from_csv( file, date_col = "date", rating_col = "rating", card_col = "card_id", date_format = "%Y-%m-%d" )
file |
Path to CSV file |
date_col |
Name of date column |
rating_col |
Name of rating column |
card_col |
Name of card ID column |
date_format |
Date format string |
A tibble with standardized review data
## Not run: reviews <- fsrs_from_csv("reviews.csv", date_col = "date", rating_col = "grade") ## End(Not run)## Not run: reviews <- fsrs_from_csv("reviews.csv", date_col = "date", rating_col = "grade") ## End(Not run)
Extracts the FSRS parameters stored in Anki's deck configuration.
fsrs_get_parameters(path = NULL, profile = NULL)fsrs_get_parameters(path = NULL, profile = NULL)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
A list with FSRS parameters or NULL if not found
## Not run: params <- fsrs_get_parameters() ## End(Not run)## Not run: params <- fsrs_get_parameters() ## End(Not run)
Calculates the current FSRS memory state (stability, difficulty, retrievability) for all cards in the collection.
fsrs_memory_states(path = NULL, profile = NULL, include_projection = FALSE)fsrs_memory_states(path = NULL, profile = NULL, include_projection = FALSE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
include_projection |
Include projected future states |
A tibble with memory states
## Not run: states <- fsrs_memory_states() ## End(Not run)## Not run: states <- fsrs_memory_states() ## End(Not run)
Converts Anki review history to the format expected by the r-fsrs package for parameter optimization.
fsrs_prepare_for_optimizer(path = NULL, profile = NULL, min_reviews = 3)fsrs_prepare_for_optimizer(path = NULL, profile = NULL, min_reviews = 3)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
min_reviews |
Minimum reviews per card to include (default 3) |
A list of review items suitable for r-fsrs
## Not run: # Prepare data for r-fsrs items <- fsrs_prepare_for_optimizer() # Use with r-fsrs (if installed) # library(fsrs) # params <- compute_parameters(items) ## End(Not run)## Not run: # Prepare data for r-fsrs items <- fsrs_prepare_for_optimizer() # Use with r-fsrs (if installed) # library(fsrs) # params <- compute_parameters(items) ## End(Not run)
Analyze FSRS stability distribution
fsrs_stability_distribution(path = NULL, profile = NULL, by_deck = FALSE)fsrs_stability_distribution(path = NULL, profile = NULL, by_deck = FALSE)
path |
Path to collection.anki2 (auto-detected if NULL) |
profile |
Profile name (first profile if NULL) |
by_deck |
If TRUE, calculate distribution per deck |
A tibble with stability statistics
## Not run: stab_dist <- fsrs_stability_distribution() ## End(Not run)## Not run: stab_dist <- fsrs_stability_distribution() ## End(Not run)
Import data exported from the ankiR Stats Anki addon. This allows analyzing Anki data in R without direct database access.
import_addon_export(path)import_addon_export(path)
path |
Path to the JSON export file |
A list containing cards, revlog, daily_stats, and summary
## Not run: data <- import_addon_export("ankir_export.json") data$summary data$cards data$daily_stats ## End(Not run)## Not run: data <- import_addon_export("ankir_export.json") data$summary data$cards data$daily_stats ## End(Not run)
Plot time series decomposition
## S3 method for class 'anki_decomposition' plot(x, ...)## S3 method for class 'anki_decomposition' plot(x, ...)
x |
An anki_decomposition object |
... |
Additional arguments (unused) |
A ggplot object (if ggplot2 available) or base R plots
Print Gamification Stats
## S3 method for class 'anki_gamification' print(x, ...)## S3 method for class 'anki_gamification' print(x, ...)
x |
Gamification stats object |
... |
Additional arguments |
Print Monte Carlo Forecast
## S3 method for class 'anki_mc_forecast' print(x, ...)## S3 method for class 'anki_mc_forecast' print(x, ...)
x |
An anki_mc_forecast object |
... |
Additional arguments (ignored) |