update code style to match Google's R style guide