Figured out how to write a function in R.  Note: You have to use a star (*) to multiply, you can't just put parentheses next to each other