google / google/styleguide

Example Function 'CalculateSampleCovariance' in the R Style Guide mixes use and omission of curly braces for single-statement blocks.

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated lang:R
Dominant language
HTML
Stars
39.6k
Forks
12.9k
Avg merge
42m
Merged PRs (30d)
15

Description

```
What steps will reproduce the problem?
The function definition is at
http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html

What is the expected output? What do you see instead?
As stated earlier in the style guide, curly braces should be used or not used
consistently when dealing with single-statement blocks. In the example
function 'CalculateSampleCovariance', curly braces are used in the
single-statement blocks following the first two if statements and not the
single-statement block following the third.

```

Original issue reported on code.google.com by `bkj.emai...@gmail.com` on 14 Aug 2010 at 3:47

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.