Learn R Programming

BigDataStatMeth (version 2.0.3)

get_memory_thresholds: Get dynamic memory thresholds based on system RAM

Description

Calculates appropriate memory thresholds for conversions based on total system RAM. Returns conservative values suitable for most systems.

Usage

get_memory_thresholds(total_ram = NULL)

Value

Named list with thresholds in MB:

silent

Size below which conversions happen silently

warning

Size requiring user confirmation

force

Size requiring force=TRUE

blocked

Size that cannot be converted

Arguments

total_ram

Numeric. Total system RAM in GB. If NULL (default), auto-detects using C++ implementation.

Details

Calculation logic:

Uses percentage of total RAM with safety margins:

  • Silent: 15\

  • Warning: 30\

  • Force: 50\

  • Blocked: 80\

Fallback values (if RAM detection fails):

  • Silent: 2 GB

  • Warning: 4 GB

  • Force: 8 GB

  • Blocked: 16 GB

See Also

get_total_ram, memory_info

Examples

Run this code
# \donttest{
# Auto-detect
thresholds <- get_memory_thresholds()
# $silent: 3000 MB, $warning: 8000 MB, etc.

# Manual specification (e.g., for 32GB system)
thresholds <- get_memory_thresholds(total_ram = 32)
# }

Run the code above in your browser using DataLab