Skip to content

Problem with edit()

2 messages · Jeff Freedman, Jeff Newmiller

#
There is a difference between parsed functions and .R files.  What you see when you type the name of a function alone on the R command line is a text representation of the parsed function that is ready to run in RAM. That has none of the comments or whitespace from the function as you wrote it.  The parsed version is what the "edit" function allows you to modify. This is why we use .R files.

FWIW I never use the "edit" function. I use a separate window for editing the code I want to keep, and either copy/paste the bits I want to execute (with or without the use of macros to facilitate that) into the R command line, or use the "source" function to pull in a set of functions all at once.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Jeff Freedman <JFreedman at awstruepower.com> wrote: