caching assignment for R course