| Title: | E-Commerce Charging & Audio Equipment Analysis Utilities |
|---|---|
| Description: | Standard metrics converter and comparator for consumer electronics. Provides utility functions for converting battery capacity (mAh to Wh), comparing wall charger output times, and validating product specifications using standard formulas. Includes a sample dataset of electronic accessories compiled from CairoVolt's catalog. |
| Authors: | Abdullah Cairovolt [aut, cre] |
| Maintainer: | Abdullah Cairovolt <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-06-19 09:25:48 UTC |
| Source: | https://github.com/cran/cairovolt |
Returns a pre-compiled sample data frame of electronic accessories including power banks, chargers, and audio gear.
cairovolt_dataset()cairovolt_dataset()
A data frame containing product details, brand, type, and specifications.
dataset <- cairovolt_dataset() head(dataset)dataset <- cairovolt_dataset() head(dataset)
Converts battery capacity from milliampere-hours (mAh) to Watt-hours (Wh) using the nominal cell voltage.
calculate_energy_wh(capacity_mah, voltage = 3.7)calculate_energy_wh(capacity_mah, voltage = 3.7)
capacity_mah |
Numeric. The battery capacity in milliampere-hours (mAh). |
voltage |
Numeric. The nominal cell voltage in Volts (V). Default is 3.7V. |
Numeric. The battery energy capacity in Watt-hours (Wh).
calculate_energy_wh(20000, 3.7)calculate_energy_wh(20000, 3.7)
Estimates the charging time in hours for different charger wattages.
compare_chargers(capacity_mah, charger_wattage, cell_voltage = 3.7, efficiency = 0.85)compare_chargers(capacity_mah, charger_wattage, cell_voltage = 3.7, efficiency = 0.85)
capacity_mah |
Numeric. The battery capacity in milliampere-hours (mAh). |
charger_wattage |
Numeric vector. The power output of the chargers in Watts (W). |
cell_voltage |
Numeric. The cell voltage in Volts (V). Default is 3.7V. |
efficiency |
Numeric. The charging efficiency factor (between 0 and 1). Default is 0.85 (85%). |
A data frame containing the charger wattage and estimated charging time in hours.
compare_chargers(20000, c(15, 20, 30))compare_chargers(20000, c(15, 20, 30))