Welcome!

Server Monitoring Authors: Liz McMillan, Carmen Gonzalez, Ken Schwaber, JP Morgenthal, Pat Romanski

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

@ThingsExpo Stories
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
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...
SYS-CON Events announced today that Telecom Reseller 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, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...