[R] Formatting column displays
Bruce Ratner PhD
br at dmstat1.com
Fri May 5 15:25:04 CEST 2017
Ulrik: Thanks for reply. I obviously new to R, so I feel if the output on the console looks right I'm half way through my problem. I know it's not WYSIWYG, but it's a quasi start.
> On May 5, 2017, at 8:56 AM, Ulrik Stervbo <ulrik.stervbo at gmail.com> wrote:
> Hi Bruce,
> display as in the console or as a table for presentation?
> For the latter, look at sprintf:
> sprintf("%,1f", 1)
> sprintf("%.2f", 2.5678)
> sprintf("$%.3f", 2.5678)
>> On Fri, 5 May 2017 at 14:08 Bruce Ratner PhD <br at dmstat1.com> wrote:
>> I need some references for formatting the display of my data frame columns.
>> Any guidance will be appreciated. Bruce
>> I have a date frame with one column as an integer for which I want a comma display,
>> one column consisting of dollar amounts, one column for which I want a display to two digits after the decimal point, and one column as integers ranging between
>> 100 - 999.
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help