Align columns: Difference between revisions

m
→‎{{header|R}}: Horizontally scrollable output
(Added R code)
m (→‎{{header|R}}: Horizontally scrollable output)
Line 969:
</lang>
Right justified output shown.
<div style="width:full;overflow:scroll"><pre>
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[1,] [,1] Given [,2] a [,3] text [,4] file [,5] of [,6] many [,7] lines, [,8] where [,9] fields within [,10] [,11] a [,12] line
[21,] Given are delineated a by text a file single 'dollar' character, of write many lines, a programwhere fields within a line
[32,] that are delineated aligns by each column a ofsingle 'dollar' character, fields write by ensuring a thatprogram words in each
[43,] column that aligns are separated each bycolumn atof least one space. fields by ensuring that words in each
[54,] Further, column allow are separated for eachby word at least in one space. a column to be either left
[65,] justified Further, rightallow justified, for or centereach justified withinword its in column. a column to be either left
[6,] justified, right justified, or center justified within its column.
</pre></div>
 
=={{header|Ruby}}==
Anonymous user