Skip to content

.R file

5 messages · zhiji19, Tal Galili, Dennis Murphy +2 more

#
Hello everyone

Can you please teach me how to save my homework as .R file?

I write my code in RGui. When I tried to save my work, the RGui only allows
me to save it as .RData.

By the way, after I save my work as .RData, I cannot reopen it. when I open
it, only one message comes out as following: "ARGUMENT_ignored_."
#
You mention Notepad++, I'm still using vi under cygwin and an ancient copy of ultra edit.
When I was first learning Java and c++, the various commercial IDE 
packages were great. However, I've found that with most things I end up integrating
with bash scripts and end up in vi for "touch up" anyway- and if you take the
time to learn it many of the odd commands are quite helpful. IIRC many
of the IDE's offer language-specific help beyond syntax highlighting such as signature suggestions as you type or menu options for compiling and debugging that 
pure text editors lack, not sure what the
R IDE does. I finally developed alt approaches for finding signatures and
it turned out to be easier to do this outside ide although sometimes I
compile bad code due to typo that IDE would have flagged. 
In the simple case on windows, I vi my .R file and then invoke a script
to run it. In many cases ,the IDE menu's for more language specific actions
like compile and build are confusing and limited and have a learning curve
and there too I end up editing bash scripts using cmd line alt.
So, I guess my point is that I would not just run to an IDE for R or
others :)
#
On Mon, Oct 25, 2010 at 9:11 AM, Mike Marchywka <marchywka at hotmail.com> wrote:
People who uses vi or vim may be interested in looking at the plugin
to Vim that I'm developing. The plugin works in Windows, Linux and OS
X:

http://www.vim.org/scripts/script.php?script_id=2628

It's main features are:

  * Syntax highlighting for R syntax, including:
      - Special characters in strings.
      - Functions of all installed packages (must be updated manually).
      - Special highlighting for R output (.Rout files).
  * Smart indentation for R syntax.
  * Integrated communication with R:
      - Start/Close R.
      - Send lines, selection, paragraphs, functions, blocks, entire file.
      - Send commands with the object under cursor as argument:
        help, args, plot, print, str, summary, example, names.
      - Send to R the Sweave and pdflatex commands.
      - Run R inside a Vim's buffer (with Conque Shell plugin;
        currently available only on Unix -- Linux or OS X).
  * Omni completion (auto-completion) for R objects
    (.GlobalEnv and installed packages. The list of installed
     packages must be updated manually.
  * Ability to see R's documentation in a Vim's buffer:
      - Automatic calculation of the best layout of the R
        documentation buffer (split the window either horizontally
        or vertically according to the available room).
      - Automatic formating of the text to fit the panel width.
      - Send code and commands to R (useful to run examples).
      - Jump to another R documentation.
      - Syntax highlighting of R documentation.
  * Object browser (.GlobalEnv and loaded packages; must be updated manually):
      - Send commands with object under cursor as argument.
      - Call R's help() with object under cursor as argument.
      - Syntax highlighting of the object browser.
  * Most of the plugin's behavior is customizable.