[R] Google style

Mark Knecht markknecht at gmail.com
Mon Aug 31 17:50:23 CEST 2009

On Mon, Aug 31, 2009 at 6:36 AM, Terry Therneau<therneau at mayo.edu> wrote:
> The authors borrowed so much else from C, the semicolon would have been
> good too.

I know real R coders will chuckle but I've taken to using semicolons
just because it looks better to my eyes and let's my brain know where
I think lines end. True, the language isn't checking for them but it
keeps my typing consistent with the only other language I program in.

plot(cumsum(T1$PL_SUM) ~ T1$MyDate, typ="l");
lines(cumsum(Z1$PL_SUM) ~ Z1$MyDate, typ="l", col="green");
lines(cumsum(Z2$PL_SUM) ~ Z2$MyDate, typ="l", col="red");
lines(cumsum(Z3$PL_SUM) ~ Z3$MyDate, typ="l", col="purple");

While it's not supported today, maybe one day there could be a way it
was? Who knows...


More information about the R-help mailing list