using built in R method versus author defined method