Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions
Content added Content deleted
(Added solution for Action!) |
ReeceGoding (talk | contribs) m (→{{header|R}}: Syntax highlighting.) |
||
Line 497: | Line 497: | ||
</pre> |
</pre> |
||
=={{header|R}}== |
=={{header|R}}== |
||
<lang |
<lang rsplus>text <- scan("Rodgers.txt", character(), sep = "\n") |
||
print(text) |
print(text) |
||
reversed <- rev(text) |
reversed <- rev(text) |