tags:

views:

112

answers:

2

I'm a relatively new user to R and Emacs and was wondering if Emacs could automatically correct any R commands that i've typed wrong. I know about the alt-/, but I was more thinking along the lines of if i type read.tale, it corrects it to read.table.

Also, I was using emacs the other day and whenever i typed read.table, it showed the usage options (that bit from the help file) in the bottom bit of the window-the minibuffer?. anyway, its not there now, and i don't know what i did to make it go away.

Thanks for your help

+1  A: 

Independently of emacs, you can examine your code with the checkUsage function in the codetools package. For example:

> foo <- function(data){
+   read.tale(data,file='temp.txt')
+ }
> checkUsage(foo)
<anonymous>: no visible global function definition for ´read.tale´

Also, you can emacs autocompletion functions (e.g. hippie-expand or dabbrev-expand) to fill in the rest of recently used function and variable names.

nullglob
+1  A: 

If you aint married to emacs, you should give Komodo edit with sciviews-R / sciviews-K a try. So far it´s the best auto-completion coding I found for R. At least to me the configuration was much easier than emacs, particularly because of binding problems with my exotic (swiss) keyboard. sciviews-R / Komodo

ran2