Re: [Rd] Tabs in R source code

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Sun, 29 Nov 2009 11:40:29 -0500

On 29/11/2009 10:58 AM, Peng Yu wrote:
> Some lines are indented by tabs and some lines are indented by spaces,
> in R source code. This might due to the fact that the source code is
> not from a single person. But I think that it is better to enforce a
> single convention.
>
> My editor defaults a tab to 8 spaces. So some source doesn't seem to
> be indented correctly in my editor. Since tab may be displayed
> differently in different editor, I recommend to replace all the tabs
> by the appropriate number of spaces to ensure the same indentation
> display.

The R source code assumes that tabs occur every 8 columns, so if your editor is working properly, it should display files as intended.

> Could somebody update the source code in the future version by
> replacing tabs by spaces and enforce such a coding convention in the
> future?

No, that would not be feasible, for the reason you give in the second sentence of your post.

Duncan Murdoch



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 29 Nov 2009 - 16:49:56 GMT

This archive was generated by hypermail 2.2.0 : Sun 29 Nov 2009 - 17:30:52 GMT