Function for monitoring copies
Remove rhistory
Extract typename function from base R