Function Reference
The cccc package provides a comprehensive set of functions organized around the four-stage analytical pipeline. Below, functions are grouped by their primary purpose to help you navigate the workflow more effectively.
📥 Data Import & Preprocessing
Functions for importing, validating, and preparing your corpus data.
Function | Description |
---|---|
importData() |
Imports and validates corpus data and metadata into a standardized structure for analysis. |
normalization() |
Normalizes the term-document matrix using various schemes (nc, nchi, nM, nmM, nnl). |
📊 Exploratory Visualization
Functions for initial exploration and visualization of corpus characteristics.
Function | Description |
---|---|
rowMassPlot() |
Creates a bar plot of keywords ordered by total frequency and colored by frequency zone. |
colMassPlot() |
Plots the temporal dimensions of a corpus, showing distribution across time periods. |
📈 Temporal Modeling & Smoothing
Functions for modeling keyword trajectories and selecting optimal smoothing parameters.
Function | Description |
---|---|
smoothingSelection() |
Selects optimal smoothing parameters for chronological keyword curves using cross-validation. |
optimalSmoothing() |
Selects the optimal spline degree and penalization strategy for trajectory smoothing. |
plotSuboptimalFits() |
Plots suboptimal smoothed curves for selected keywords to compare different smoothing approaches. |
📉 Trajectory Visualization
Functions for visualizing temporal curves and frequency patterns.
Function | Description |
---|---|
curvePlot() |
Plots temporal curves of keyword frequencies over time periods. |
curveCtuPlot() |
Plots temporal curves for frequency zones with example keywords highlighted. |
facetPlot() |
Creates faceted plots of keyword frequency curves for comparative visualization. |
📖 Quick Reference Guide
Typical Workflow
- Import your data →
importData()
- Explore the corpus →
rowMassPlot()
,colMassPlot()
- Normalize frequencies →
normalization()
- Visualize trajectories →
curvePlot()
,curveCtuPlot()
,facetPlot()
- Select smoothing parameters →
smoothingSelection()
,optimalSmoothing()
- Compare fits →
plotSuboptimalFits()
Function Categories Summary
Category | Number of Functions | Purpose |
---|---|---|
Data Import & Preprocessing | 2 | Prepare and normalize data |
Exploratory Visualization | 2 | Initial corpus exploration |
Temporal Modeling | 3 | Optimize smoothing parameters |
Trajectory Visualization | 3 | Visualize temporal patterns |