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
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
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...
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...
Cell networks have the advantage of long-range communications, reaching an estimated 90% of the world. But cell networks such as 2G, 3G and LTE consume lots of power and were designed for connecting people. They are not optimized for low- or battery-powered devices or for IoT applications with infrequently transmitted data. Cell IoT modules that support narrow-band IoT and 4G cell networks will enable cell connectivity, device management, and app enablement for low-power wide-area network IoT. B...
The hierarchical architecture that distributes "compute" within the network specially at the edge can enable new services by harnessing emerging technologies. But Edge-Compute comes at increased cost that needs to be managed and potentially augmented by creative architecture solutions as there will always a catching-up with the capacity demands. Processing power in smartphones has enhanced YoY and there is increasingly spare compute capacity that can be potentially pooled. Uber has successfully ...
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
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...