Thomas J Hoffmann, Department of Biostatatistics, Harvard School of Public Health

This page just describes a few pieces of software, and how to install them. All but one are completely free; the one is semi-free. Many are platform independent, but a few are not. I have found this software invaluable to me; I hope it helps you.

Miscellaneous Advice / Software

I don't use a html editor (I go from source, try one of the below R editors, jedit is particularly well-suited for this), so I don't know of any good specifically html editors, but note that OpenOffice (free, a better office suite depending on your opinion) exports to html. My favorite e-mail client is Thunderbird, and I would encourage all to use firefox. Oh, and don't forget about gimp for editing any graphics files (sort of like photoshop). Lastly there is blender, which is just a really fun program to use.

A lot of this is actually easier to set up in linux, but works great in windows. If you compile c++ code for use with R or otherwise, it just sort of works almost out of the box, otherwise your going to need to search for how to do this. It's not too bad, but there isn't a simple installer to just do it for you in windows.

R Editors / Syntax highlighting

All of these editors work with many different file types. E.g. c++/java/perl/python/..., matlab/R, and many more. I really like syntax highlighting (colors specific parts of your code) as I think it just makes code a lot easier to read. My personal favorite is x-emacs, being platform-independent and a great interface with R! StatET is a new one that works with eclipse.

Xemacs + ESS (Emacs Speaks Statistics)

Description: Great highlighting (see colors list white background or colors list black background if you are fully customizing your x-emacs experience), has ingenious TAB indentation for editing (you'll wonder how you ever did without it), TAB completion for R commands, etc.! It's more featured in that it supports some of the windows gui R features of sending code from the buffer to R in a mouseclick or a keypress. Some say it's harder to get used to, but I disagree, especially if you remap the emacs key-bindings to familiar windows bindings. It is maybe a little harder to install than the others, but it's often my personal favorite (otherwise kate). If you use linux, it's integration with the R interface is even more useful.
E-macs is also excellent, but I like X-emacs better.
Get the software emacs (see previous, under latex editors)
Get the software ess: http://stat.ethz.ch/ESS/
- It's really not hard to install - maybe it'll even come with the next version of xemacs, or you can probably install it in the packages menu. I just unzip ess and stick it in, say, "C:\Programs\ess-xxx\". Then, from xemacs, go to 'Options' > 'Edit init file', and you can copy and paste my init file if you like - I've got a lot of other things set like some windows shortcuts and color-scheme which you might not like, so otherwise just copy the short piece refering to ess.

Jedit


Description: Written in Java, so all platforms supported, but a little slower on old systems. Easy install. The only trouble is one has to remap the '.R' extension so that it highlights what we want, instead of a different file format. What I suggest isn't the best solution, but may be sufficient for you.
Get the software: http://www.jedit.org/
Get the syntax highlighting: http://community.jedit.org/?q=filestore/browse/21&from=50
You'd probably also need the java runtime environment if you don't have it already.

Eclipse+StatET

Eclipse is a full featured programming editor that has a plugin for R called StatET. It's quite nice, but not my favorite.

Kate

Description: Linux only editor (KDE), that has become my favorite editor, I just miss inline spell-checking. Also check out KDevelop for a nice environment. It automatically comes with support for R files!
Get the software: http://kate.kde.org/ (otherwise it should have some with your distro).

Nedit


Description: A very lightweight editor - would be good for some of the old hardware they have around here, except it's only linux & macintosh. To be completely accurate you can use it under windows, but I think you need to install cygwin, or you might be able to get it to work with the Xmanager software they have installed.
Get the software: http://www.nedit.org/
Get the syntax-highlighting: http://www.nedit.org/ftp/contrib/highlighting/R.pats

  Getting syntax highlighting to work:
    nedit -import R.pats
    options(editor="nedit -lm R") # Haven't tested this at all - not my favorite editor
  

Getting LaTeX (and more) on your windows system.

  1. MikTex
    First you need to install MikTex - this is a dependency of any nice user interaface you would use. I suggest that you let it install into the default directory. Then you will want to get yourself an editor:

  2. Now you want the editor programs:
    • TeXnicCenter - My personal favorite in windows. Once it has been installed, start the program up. Since you installed the previous software in it's default place, you should be able to just hit "next" until it completes. Now go to tools > Options > Spelling, and check the box to get it to check spelling as you type (and set anything else you like).
    • Xemacs - Like emacs; you've seen this or can see this on the unix accounts. Make sure you've turned on syntax highlighting or your really missing out! It's just easiest to get the one that references the "kitchen sink", though this might be slower on systems that aren't powerful enough. It's installed by default on most systems here. You might have to add a package to get it to work (Options > Packages > ...).

  3. TeXaide
    Now, something like the Microsoft Equation Editor (R)/(TM). The first time you use it, it may give you a couple errors about fonts, but this doesn't seem to affect anything. After you put in the equation, highlight the equation you entered, copy it, and then paste it into your editor. I usually enter formulas by hand - when it's faster to do so. Otherwise, this is a wonderful piece of software. It is suggested that you give an e-mail address that you don't ever check.

  4. JabRef
    One last program can be used for bibtex (used for citing sources - creates your .bib file). You will need java runtime environment (I prefer offline) or java sdk (for developers, or if you ever want to code in java) in order to run this. There are others, but this is my favorite as it runs on all OS'es, and I was working on a combination of linux and windows computers when I was using this last. The only minus is that it's written in java, so it may run poor on really old machines, but should run on anything that's about 3-4 years old or newer just fine.

  5. LyX
    Some people love this, some people hate this; I'm the former. It imports and exports to the tex format, so it's absolutely fantastic. You enter formulas and things similar to the way you enter tex things (or via gui if you prefer), but it draws it as you type it. A must try. You can even do slide presentations (give beamer a go, it's really easy). I'd suggest always exporting your final documents to the .tex format (I've had a document from one version of LyX that didn't import into a newer version). Installation is easy, with it forwarding you to all dependencies - you probably don't need all of these, but you will need some of them (read the installation instructions as you go).

Moving files from windows to unix and vice versa:

SSH Secure Shell. Download the "SSH Secure Shell-x.x.x.exe", making sure you look at and accept the license agreement here to be sure it applies to you.

Getting X in windows (i.e. getting a graphical window manager in remote connections to other machines)

Use the ssh program just described, making sure you check the option "Tunnel X Connections" inside it (CRITICAL). Then install X-ming, a gpl x-server. Take a look at it's homepage to get an idea of what this is. My best windows ex would be the remote desktop connection if you've tried it in windows xp pro.

Getting Linux/UNIX GUI / emulator within Windows

These will also let you get X in windows, but it's a bit overkill if that's all you want to do. If you'd like to test out linux before your ready to partition your hard drive and go for the real thing, these are fantastic. You might aso try vmware (warning, not completely free, some versions are semi-free, but I've tried this and it's nice), or there is also Virtual Box, which is completely free that I haven't tried yet.

For cygwin, this was slightly modified from an e-mail I sent off to my cousin when he did his undergrad in CS. I would suggest you ignore all the programming and extra packages that I said might be useful to him (they could be useful to you depending on what you do your future research in, so I leave it in) and just get the original packages I mention (openssh, openbox, rxvt). Good luck!

Second, in regards to cygwin for windows (in case you aren't yet comfortable
installing a linux distro).
http://www.cygwin.com/
Default directory is good for this if you don't mind it on your C drive.
However, you need to be sure that you select a few things if you want it a
usable system.

Now, when you try to install it, first go to cygwin.com and click "mirror sites"
on the left, and find the one closest to you.  This is the site that you should
choose when you install.  If it fails, choose the next closest site.

When you finally get a list of packages to install, you must customize this
list, so that it's usable.  It's in a tree like structure.  After you expand a
tree, click on the square box to the left, and it should say "install" or
something like that next to it for that package.

Usable for xterming (you know how your windows client just gets a text based
interface after you connect to your remote commputer with ssh?  well this lets
you get a graphical interface so you can see the syntax highlighting information
and any debuggers.  As a side note, 'ddd' is a great debugger for debugging
c/c++ programs!  I sure wish they had told me that earlier!).  I'll give them
with proposed tree group name (I can't remember - you may have to do some
browsing), and then package name.
  network > openssh  (critical)
  X11/Xorg > openbox (this should pick up most of the packages you need for X11)
  ???      > rxvt    (may make keyboard work a little better? unexplored)

Usable for c++ compilation - theoretically, as I've never actually tried this
(always went to linux for this on my personal system).
  gcc-c
  gcc-c++  (pretty much choose everything with gcc; I think these are in
programming category)
  ddd
  xemacs  (or emacs if you prefer that at school - I love the tab indentation)
  nedit   (not critical - an editor that I really like - windows shortcuts).
  xterm   (critical)
  ? maybe you can even install some sort of minimal jdk with it?  jikes is a
great non-gui java compiler with better compiling errors and 10 times as fast) ?
  ? any other command you type from school ?

Now that you've finished installation, to connect into school (">" is the
command prompt):
a) click on the "Cygwin Bash Shell" icon
b) type
  > xinit.exe
   (if that doesn't work, maybe "startx" instead of "xinit.exe"
c) typing
  > openbox &
   will start up a low powered window manager (like kde, gnome, blackbox,
windowmaker), and background it.
d) side note: right clicking on the desktop brings up a menu of choices - note
that some of these may not be installed
d) now, to connect into school
  >  ssh superman@hsph.harvard.edu -X
  where "superman" is your username, "hsph.harvard.edu" is your server (a guess), and
"-X" tells it to forward the X connections.
   It might ask you a question; type yes.  Then type your password.
e) if all went well, you should be able to run commands!  It may be a little
slow depending on your network connection, but it's a start...
   try:
   > xterm &
   > nedit &    (Comment to hsph - not installed on these archaic beasts)
   > xemacs &

Now, if your using your own system, and you install more packages, (e.g. gcc,
xemacs, ...), then say you are all done with a program you created.
 > scp the_file_to_transfer.cpp  biostat_user@hsph.harvard.edu:
 will put it in your home dir
 > scp the_file_to_transfer.cpp  biostat_user@hsph.harvard.edu:xfer/
 will put it in $HOME/xfer, if you've created an 'xfer' dir there
 and finally
 > scp -r the_dir_your_copying  biostat_user@hsph.harvard.edu:
 for larger projects.  Alternatively you use the GUI sftp program you have and
figure out where cygwin put the files.  You can also just zip them and send them
(faster if it's lots of little files).  [ASIDE: This GUI sftp program was described
in the prior section.]
Navigation
Projects
Resources
Contact Information
Thomas Hoffmann
655 Huntington Ave.
Department of Biostatistics
Building 2, 4th Floor
Boston, MA 02115
Last Updated: