anagram.R: improved out formatting to match other languages