Saturday 20 August 2011

P.S. Formatting R output

R output is clunky in the extreme. Variable numbers of spaces are used to format output, which means you can't readily cut and paste into other applications.
At the end of the previous program, Generic Univariate ACE with saturated model comparison, I showed you how you can export relevant output in tab-separated format.
Here is a another tip, which can be used just to cut and paste straight from the R console, and which I learned from this site (though it needed modifying).
Cut and paste the relevant output into Word.
Then:
  1. Choose Replace from the Edit menu (or press [Ctrl]+H) to open the Find And Replace dialog box.
  2. Click the More button.
  3. In the Find What text box, enter one space character and the following characters, exactly as shown: {1,}
  4. In the Replace With control, enter ^t.
  5. Check the Use Wildcards option.
  6. Select Replace All




No comments:

Post a Comment