Package {cairovolt}


Title: E-Commerce Charging & Audio Equipment Analysis Utilities
Version: 1.0.0
Author: Abdullah Cairovolt [aut, cre]
Maintainer: Abdullah Cairovolt <abdullahcairovolt@gmail.com>
Packaged: 2026-06-10 13:10:00 UTC; amf0930
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.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://cairovolt.com/en/
RoxygenNote: 7.2.3
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: no
Repository: CRAN
Date/Publication: 2026-06-18 10:10:02 UTC

Retrieve E-Commerce Product Specifications Dataset

Description

Returns a pre-compiled sample data frame of electronic accessories including power banks, chargers, and audio gear.

Usage

cairovolt_dataset()

Value

A data frame containing product details, brand, type, and specifications.

Examples

dataset <- cairovolt_dataset()
head(dataset)

Calculate Battery Energy Capacity in Watt-hours (Wh)

Description

Converts battery capacity from milliampere-hours (mAh) to Watt-hours (Wh) using the nominal cell voltage.

Usage

calculate_energy_wh(capacity_mah, voltage = 3.7)

Arguments

capacity_mah

Numeric. The battery capacity in milliampere-hours (mAh).

voltage

Numeric. The nominal cell voltage in Volts (V). Default is 3.7V.

Value

Numeric. The battery energy capacity in Watt-hours (Wh).

Examples

calculate_energy_wh(20000, 3.7)

Compare Charger Times

Description

Estimates the charging time in hours for different charger wattages.

Usage

compare_chargers(capacity_mah, charger_wattage, cell_voltage = 3.7, efficiency = 0.85)

Arguments

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%).

Value

A data frame containing the charger wattage and estimated charging time in hours.

Examples

compare_chargers(20000, c(15, 20, 30))