Welcome!

Server Monitoring Authors: Yeshim Deniz, Liz McMillan, Pat Romanski, Carmen Gonzalez, Ken Schwaber

Blog Feed Post

Emacs, ESS and R for Zombies

by Rodney Sparapani, PhD Rodney is an Assistant Professor in the Institute for Health and Society from the Division of Biostatistics at the Medical College of Wisconsin in Milwaukee and president of the Milwaukee Chapter of the ASA which is hosting an R workshop on Data Mining in Milwaukee on April 4th. Emacs Speaks Statistics (ESS) is a GPL software package for GNU Emacs that provides support for several statistical programming languages. This post which focuses on ESS and R, provides some history on both Emacs and ESS, provides some guidance on installing both environments and the basics of how to get started. Brief History of Emacs Emacs has a long and important history as a programmer's editor.  It was created in 1976 by Richard Stallman AKA RMS.  In 1984, RMS released GNU Emacs; the first free software program released by the GNU Project.  Originally, Emacs provided intelligent editing for popular programming languages of the time such as Pascal, PL/I and Fortran; each language was supported by a corresponding "major mode" which we will call a mode for short.  Now Emacs has modes for the popular programming languages of today such as R (via ESS), C/C++, Java, Perl and Python.  Modes are the killer app of Emacs.  You can learn one editor, Emacs, which provides an IDE for practically all of the programming languages you are likely to ever need.  Emacs also supports a wide variety of markup languages like LaTeX (via AUCTeX) and HTML. Installing Emacs You can find the source code for GNU Emacs online.  I highly recommend the latest stable release, v24.3, for its feature richness and stability.  MS Windows and Mac OS X users can find binaries online (which come with ESS and AUCTeX included) at Vincent Goulet's web page. If you are using Linux or UNIX, then you may be able to find binaries for Emacs from a repo associated with your distribution.  If not, then you can install Emacs from source.  However, beware, Emacs has a lot of dependencies; an abbreviated list includes giflib, libpng, libtiff, ispell/aspell, libXaw and ncurses.  By default, configure assumes that the install location is /usr/local, but you can override that with the --prefix option: configure --prefix=/opt/local --with-x-toolkit=lucid --without-gconf These options should work on a wide variety of Linux and UNIX distributions. Dissecting an Emacs Frame The Emacs window is called a Frame; we will dissect the Frame from top to bottom.  In Figure 0, you can see that the Menu is at the top. Figure 0 Just below that is the Toolbar with icons for common operations.  Next, we come to the buffer area where the file you are editing appears.  Below that is an information strip called the mode line.  From left to right, the mode line has several items which you can hover over to receive tips on what they represent.  In Figure 0, you will see that at the beginning of the mode line, there are 5 characters which each represent file information: the coding system, the end-of-line character, writable or read-only, whether the buffer has been modified and the current directory respectively; all but the last can be modified by clicking on the corresponding character.   Next is the file name.  The mode name will follow and be in parentheses.  And, finally, at the bottom is the minibuffer which we will see more of. Common Operations and Modifier Keys Besides modes, Emacs is known for its commands bound to key sequences. You can perform a lot of operations from the Menu and the Toolbar that are self-explanatory.  However, due to the constant mouse movements you may find these inconvenient; key combinations exist for many common operations. In the Emacs help notation, C-KEY means hold down the Control key while pressing another KEY. For example, C-h means hold down Control while pressing h.  For new Emacs users, C-h is very helpful.  C-h is the help key; note that C-h is also assigned to F1 for convenience. The key sequence C-h t or F1 t will launch the Emacs tutorial.  C-h k runs the command describe-key.  After pressing C-h k you will see the following prompt in the minibuffer "Describe key (or click or menu item):" which will wait until you press a key sequence (or click or pick a menu item).  For example, entering C-g after the prompt produces:  C-g runs the command keyboard-quit, which is an interactive compiled Lisp function in `simple.el'. It is bound to C-g. (keyboard-quit) Signal a `quit' condition. During execution of Lisp code, this character causes a quit directly. At top-level, as an editor command, this simply beeps. It is this help at your finger tips which is the self-documenting feature of Emacs.  Remember C-g, it can be used to cancel a command in progress if you change your mind or you launched the command in error. A few other useful commands relate to splitting the current buffer; C-x 2 will split the current buffer in half above and below.  C-x 1 will return it to one buffer.  Similarly, C-x 3 splits the current buffer left and right and C-x 1 will restore it. M-KEY means hold down the Meta key while pressing another KEY.  On PC (Mac) keyboards, the Meta key is usually the Alt (Option) key.  On UNIX keyboards, Meta keys are usually to the left and right of the spacebar and have a solid diamond symbol.  To be sure, use describe-key, i.e. C-h k M-x  Of course, you will not be sure which key is the Meta key, but you will quickly find out.  If you don't have a Meta key for some reason, you can press and release the Escape key and then press KEY.  You can execute an emacs command by name as follows: M-x COMMAND Enter.  For example, to run describe-key: M-x describe-key Enter. Brief History of ESS In the late 1990s, Anthony Rossini lead the effort to merge S-mode (developed by David Smith, editor of this blog), SAS-mode and Stata-mode into one package: Emacs Speaks Statistics (ESS).  Originally, ESS supported GNU Emacs and XEmacs.  XEmacs was a popular fork of Emacs at that time, but the feature set of Emacs and XEmacs have diverged. Today, ESS only supports GNU Emacs; the current stable release is v13.09-1.  However, XEmacs users can still use the slightly older version of ESS (circa 2012) v12.04-4.  You can find every release of ESS from 2002 onward in the ESS archive here. Installing ESS You can find the source of ESS online at the R Project.   As already mentioned, you can install Emacs and ESS simultaneously with Vincent Goulet's binaries. You can get the current stable release as well as other releases from the ESS archive. Like all free software, ESS is a work in progress.  Between releases, new features and bug fixes appear in the ESS repo.  If you have a need to install the latest development release, then you can grab the source from one of the ESS repos.  ESS has two repos; one based on subversion, AKA SVN, and the other based on git.  Although, the SVN repo is the basis of releases, the two repos are synchronized regularly. You can check out the latest development release from SVN via the command: svn checkout https://svn.r-project.org/ESS/trunk /path/to/ESS   Replace /path/to/ESS with the directory on your local system where you want to store ESS. Or, similarly, via the git command:   git clone https://github.com/emacs-ess/ESS.git /path/to/ESS The steps to install ESS can be found online. Please follow the steps carefully.  Note that steps 2 and 3 are optional, but steps 4 and 5 are necessary. ESS in action If you have installed ESS (and re-launched Emacs), then you should be ready to go.  In Emacs, type M-x ess-version Enter to see if Emacs is running the version of ESS that you installed.  As of this writing, the latest released version is v13.09-1 while the latest development version in the repo is v13.09-2. Now, let's take a look at an example from the Modern Applied Statistics with S (MASS) book.Type:  C-x C-f galaxies.R  Into this new file, copy and paste:  require(MASS)data(galaxies)galaxies <- galaxies>

Read the original blog entry...

More Stories By David Smith

David Smith is Vice President of Marketing and Community at Revolution Analytics. He has a long history with the R and statistics communities. After graduating with a degree in Statistics from the University of Adelaide, South Australia, he spent four years researching statistical methodology at Lancaster University in the United Kingdom, where he also developed a number of packages for the S-PLUS statistical modeling environment. He continued his association with S-PLUS at Insightful (now TIBCO Spotfire) overseeing the product management of S-PLUS and other statistical and data mining products.<

David smith is the co-author (with Bill Venables) of the popular tutorial manual, An Introduction to R, and one of the originating developers of the ESS: Emacs Speaks Statistics project. Today, he leads marketing for REvolution R, supports R communities worldwide, and is responsible for the Revolutions blog. Prior to joining Revolution Analytics, he served as vice president of product management at Zynchros, Inc. Follow him on twitter at @RevoDavid

IoT & Smart Cities Stories
Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
If a machine can invent, does this mean the end of the patent system as we know it? The patent system, both in the US and Europe, allows companies to protect their inventions and helps foster innovation. However, Artificial Intelligence (AI) could be set to disrupt the patent system as we know it. This talk will examine how AI may change the patent landscape in the years to come. Furthermore, ways in which companies can best protect their AI related inventions will be examined from both a US and...
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
Bill Schmarzo, Tech Chair of "Big Data | Analytics" of upcoming CloudEXPO | DXWorldEXPO New York (November 12-13, 2018, New York City) today announced the outline and schedule of the track. "The track has been designed in experience/degree order," said Schmarzo. "So, that folks who attend the entire track can leave the conference with some of the skills necessary to get their work done when they get back to their offices. It actually ties back to some work that I'm doing at the University of San...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.