tags:

views:

262

answers:

2

I use OS X and I am currently cooperating with a windows user and deploying the scripts on a linux server. We use git for version control, and I keep getting R scripts from his end where the character encoding used has mixed latin1 and utf8 encodings. So I have a couple of questions.

  1. Is there a simple to use editor for windows that handle UTF8 with more grace than Winedt that my coauthor currently uses? I use emacs, but I am having a hard time selling getting him to switch.

  2. How to set up R in Windows so that it defaults to reading and writing UTF8?

This is driving me crazy. Has anyone found a solution for it (be it in the workflow or in the software used) who cares to share?

+3  A: 

Take a look at ?Encoding to set the encoding for specific objects.

You might have luck with options(encoding = ) see ?options, (disclaimer, I don't have a windows machine)

As for editors, I haven't heard complaints about encoding issues with Crimson editor which lists utf-8 support as a feature.

Peter
A: 

TextPad is a well featured editor supporting R syntax that allows you to specify the target platform for files (Win/UNIX/Mac/keep current encoding) when you save them. The only problem with it is that some of the keyboard shortcuts are nonstandard (e.g. 'Find' is F5, not F3).

Richie Cotton