Utilities for R