[ESS] indentation after an incomplete assignment?
xie at yihui.name
Mon Jun 6 01:16:37 CEST 2011
Thank you all for the kind suggestions. I often use Richard's
approach, although it makes the code one line "longer" than usual.
I knew I would be asked why I used = rather than <-. I'm just an
outlier. I first learned S-Plus about 7 years ago and at that time I
was taught to use _ for assignment; later in another class I learned _
could be replaced by <-. Since = was used in all other languages I
learned and both _ and <- were difficult to type, I wondered for a
long time why we could not use =, which turned out to be false -- I
was excited that = could be used in R. Then I was stuck. I guess all
of you recognize the poem below :)
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I-
I took the one less traveled by,
And that has made all the difference.
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Sat, Jun 4, 2011 at 7:20 PM, Richard M. Heiberger <rmh at temple.edu> wrote:
> I normally use these linebreaks to get sensible indentation.
> 1, 2, 3,
> 4, 5, 6,
> 7, 8, 9),
> Similarly for list()
> xy <- data.frame(x=1:3, y=3:5)
> abcd <- xyplot(y ~ x, data=xy,
> [[alternative HTML version deleted]]
> ESS-help at r-project.org mailing list
More information about the ESS-help