Q

# R language well-suited to analytical data sampling and manipulations

## Analytics expert Mark Whitehorn explains the strengths of R and how to determine if the open source programming language fits your analytics purposes.

What factors should organizations take into account when evaluating if the R language is right for their analytics...

needs?

R is a gloriously specialized language -- I love it. If you need what it can do, it's a match made in heaven. So, what are its strengths, and what features does it have that might tempt you into a long and meaningful relationship?

R's core strength is data sampling and data manipulation. Suppose you want, for example, to take a random sample of 100 values from a set of data that is normally distributed with a mean of 65.342 and a standard deviation of 2.1. All you need is a single line:

rnorm(100,65.342,2.1)

And from that, R will generate the data you're looking for.

Now, for many people, that might sound unbelievably boring. But the power of R analytics lies in the application of the language's abilities: It's a perfect tool for numerical simulations. For example, I recently wanted to perform a Monte Carlo simulation of a scoring system called the Net Promoter Score (NPS). Monte Carlo simulations are a vital part of analytics; they allow you to model the behavior of complex systems in order to be able to understand them. Used by analytics professionals for many years, they involve random sampling of sets of numbers thousands or even millions of times.

R excels at creating and running Monte Carlo simulations, and the NPS simulation described above took a mere nine lines of code. I would love to tell you that I'm a hero because I managed to do it in nine lines, but that really isn't the case. The R programming language is simply exceptionally good at generating huge sets of numbers and then manipulating them. It's also good for prototyping big data manipulations.

How does R manage to be so good at these kinds of tasks? The answer is that it has a whole raft of functions that are designed specifically for this kind of work. Where do they come from? R is free and open source. If people want a function and can't find it, they can write one and add it to the function "bank" that is R. They have been doing that for about 15 years, which means that most of the functions you will ever need are already there.

Finally, R is a very easy language to learn -- you can just download the language and a front-end environment (such as RStudio, which I used to create the image embedded here) and start typing.

So, if you have numerical manipulations you want to perform, particularly simulations such as Monte Carlos, I really recommend taking a look to see whether the R language fits your needs. If you don't need to manipulate numbers in these kinds of ways, R is probably not for you.

This was last published in May 2014

## Content

Find more PRO+ content and other member only offers, here.

#### Have a question for an expert?

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

#### Start the conversation

Send me notifications when other members comment.

## SearchDataManagement

• ### With better scaling, semantic technology knocks on enterprise's door

Cambridge Semantics CTO Sean Martin says better scalability can lead to richer representations of data. Such advances are behind ...

• ### Big data management and analytics weather tumult -- with more in store

Cloud had a big impact on big data management and analytics last year. Machine learning and streaming designs will contribute to ...

• ### Embedded analytics to feel widest impact of machine learning projects

Ovum analyst Tony Baer discusses machine learning tools, IoT-driven streaming analytics and Hadoop in the cloud, all of which ...

## SearchAWS

• ### How to identify and avoid Amazon EMR problems

Amazon Elastic MapReduce helps our team process streaming data, but we've run into a number of issues. How can we identify and ...

• ### AWS free tier offers something for nothing on ephemeral workloads

The AWS free tier of service holds real value for tire kickers, giving them a head start in the AWS cloud, albeit with some ...

• ### Boto gains foothold as AWS SDK for Python standard

The Boto library, now an official AWS SDK for Python, helps developers build cloud-native apps. Learn which Boto version works ...

## SearchContentManagement

• ### Why SharePoint Framework could benefit business, not just developers

SharePoint Framework heralds a new, mobile-friendly, low-code era for Microsoft, which may give some organizations without .NET ...

• ### Using Microsoft MyAnalytics to improve workers' time management

Microsoft MyAnalytics has been hailed as the next great thing for analyzing worker productivity. But how can employees be assured...

• ### Is the Drupal content management system right for your business?

The open source Drupal content management system offers users responsive design and WYSIWYG content and web development tools, as...

## SearchCRM

• ### Horizontal CRM vs. vertical CRM: What do you really need?

Cloud-based computing is making it easier to customize CRM applications for vertical industries -- but would a horizontal CRM app...

• ### Sensible contact center infrastructure updates for 2017

Contact center infrastructure evolves quickly and updates are inevitably necessary. Here's how to identify and make the changes ...

• ### Flurry of technology M&A foreshadows 2017 trends

As the market continues to undergo a series of major mergers and acquisitions, some observers say to expect more technology M&A ...

## SearchOracle

• ### Oracle Database Cloud Service aims to handle apps of all sizes

Oracle continues to take the cloud fight to AWS and other more-established rivals as it expands support for running web-scale ...

• ### Cloud push complicates Oracle contracts, compliance efforts

In order to predict what 2017 holds for Oracle licensing, a look to the company's past can help reveal where it's headed -- and ...

• ### Management traits make MySQL Enterprise a fit for trading platform

MySQL under the Oracle flag has not been without controversy. But the MySQL Enterprise Edition fits the bill for makers of a ...

## SearchSAP

• ### SAP HANA, express edition makes HANA easier for non-SAP developers

Relaxed RAM and licensing requirements and the ability to run on local machines could help popularize the HANA in-memory platform...

• ### SAP futurists name five future technology trends to plan for now

Three SAP futurists explain what future technology trends in augmented reality, blockchain, AI, robotics, and contingent labor ...

• ### Abakus acquisition beefs up SAP Hybris marketing portfolio

SAP acquires Abakus marketing measurement software for SAP Hybris marketing suite; openSAP adds new courses for S/4HANA, data ...

## SearchSQLServer

• ### Options for scaling out SQL Server applications to boost workloads

Scaling out a database to meet the needs of a heavy processing workload can be a challenge. Here are details on the SQL Server ...

• ### Four trends that will impact SQL Server DBAs in 2017

Flash storage adoption, cloud computing's growth, Linux's increased importance and broader big data integration are a few trends ...

• ### DATEADD and DATEDIFF SQL functions for datetime values

DATEADD and DATEDIFF SQL functions allow you to easily perform calculations, like adding a time interval from a datetime value. ...

## SearchSalesforce

• ### Quip acquisition of Unity&Variety beefs up subsidiary

Salesforce hopes to add visual and creative elements to its document tool, while Commerce Cloud's integration with Facebook Ads ...

• ### Get started with Salesforce certification training

As the Salesforce platform expands, getting your Salesforce certification training can increasingly make you an asset to your ...

• ### What effect will Salesforce acquisitions have on the company's future?

After buying 10 companies in 2016, analysts are watching for Salesforce's next step -- whether it be more acquisitions or more ...

Close