Passed: , Failed:
doPlot <- function()
doPlot <- function() {
doPlot <- function() {
doPlot <- function()
{
plot(
plot(x,
plot(x,
y,
plot(x,
c(foo,
plot(x,
c(foo,
bar),
plot(
x,
c(foo,
bar),
plot(x, c(foo, bar))
plot( x, c(foo, bar))
plot(x,
c(foo, bar))
plot(x,
c(foo, bar))
if (foo())
if (foo())
bar
else
if (foo)
x = 1
else if (foo)
x = 1
else
x = 1
if (foo &&
while (foo &&
if (foo())
bar
else
# annoyingly placed comment
if (foo()) bar else NULL
for (i = 0;
i < (20 * intervals);
i += 1)
# annoyingly placed comment
function() {
for (i = 0;
i < (20 * intervals);
i += 1)
function() {
for (i = 0;
i < (20 * intervals);
i += 1) NULL
function() {
for (i = 0;
i < (20 * intervals);
i += 1) ()
function() {
for (i = 0;
i < (20 * intervals);
i += 1)
{
function() {
for (i = 0;
i < (20 * intervals);
i += 1) {
if (x) {
if (foo(
if (foo(
bar),
while (foo())
NULL
while (foo())
{
# Invalid parse tree
while (foo())
{
foo (()
}
repeat
foo()
function() {
repeat
function() {
repeat {
5 *
# One expression continued over more than two lines 5 ~ 5 +
else 5 +
if (foo()) 5 +
xyplot(ysim ~ xsim) +
layer(panel.ablineq(lm(y ~ x), r.sq = TRUE, rot = TRUE,
at = 0.8, pos = 3), style = 1) +
verylongfunction(a=1, b=2,
verylongfunction(a=1,
b=2 + 3 +
4,
verylongfunction(a=1, b="Multi line strings are evil"
verylongfunction(a=1, "Single line strings are OK"
verylongfunction(a=1,
verylongfunction("Multi
line strings are evil"
verylongfunction(x=1
verylongfunction(x=1 # I'm about to document an arg
x <- 1 y <- 2
x[1, 2, 3] <- 1
if (foo) {
x <-
x <- y <-
x <- 1 +
{
x <-
{
x <-
1 +
plot( x +
foo(bar, function(x)
{
if (length(foo))
x <- bar()
if () {}
foo <- foo &
foo <- function()
function() {}
foo <- function(x, y) if (x) y else x
if () x$y <- 1
while ()
x[
1, 2, 3
] <- 1
{
else {}
foo$bar <- x &
{
x %in%
if (foo &&
(bar &&
if () x <-
else x <-
x <- 1
y
foo()
bar()
foo()
"bar"()
()
{
(
(apple
x <- 1 (apple
{1}
{
1 +