Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

# 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?

Please add a title for your question

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

• ### Hyperledger Fabric offers path to enterprise blockchain future

Blockchain arose from bitcoin, but it's looking to find a place in the enterprise. Frameworks like Hyperledger Fabric could ...

• ### MongoDB 4.0 takes ACID transactions to multi-document level

MongoDB is taking a deeper step into SQL-style processing waters with a 4.0 update that brings increased support for ...

• ### Data lake concept needs firm hand to pay big data dividends

Data lakes pose technology deployment and data management challenges that can leave analytics users high and dry if the ...

## SearchAWS

• ### Direct Connect gateway grants your network global access

Large global enterprises will welcome AWS Direct Connect gateways, which enable multi-region connections to VPCs. However, some ...

• ### DynamoDB features recharge AWS database service

Developers who got sick of AWS' roundabout backup method for DynamoDB can breathe a sigh of relief. Backup and Restore, as well ...

• ### Eight tips to roll a service or app into an AWS deployment

With dozens of services available, it can be a challenge to integrate new services or apps into an AWS deployment. Use these ...

## SearchContentManagement

• ### Content management in the cloud a main theme in 2018

The future of content management resides in the cloud and with AI, as several 2018 conferences will assure you.

• ### Six things to know about today's SharePoint implementations

As companies migrate their on-premises Microsoft SharePoint sites to the cloud, here are some things they should know about the ...

• ### Upgrades for the SharePoint Online portal

As more organizations migrate SharePoint sites to the cloud, Microsoft has increased at-a-glance dashboard data and analytics to ...

## SearchCRM

• ### Blockchain loyalty programs next wave of customer experience

While blockchain platforms are still under construction and use cases are still being written, Hooters invests in its own. Others...

• ### When customer service automation goes off the rails

CRM sales and service automation can drive down costs when they drive customer self-service. But if they frustrate customers, ...

• ### Meet your friendly service agent -- The sales chatbot

AI chatbots enable companies to automate some sales and service tasks, but the combination of people and smart machines creates ...

## SearchOracle

• ### Oracle Blockchain Cloud Service: What it is and what it does

Oracle's cloud-based blockchain service uses Hyperledger Fabric to support distributed transaction ledgers for corporate users on...

• ### Using Oracle 12c Unified Auditing to set database audit policies

Oracle Database 12c's built-in Unified Auditing feature streamlines the database auditing process, including creation and ...

• ### Top Oracle tips and tricks of 2017 you won't want to forget

We've rounded up five of the most notable tip articles we published in 2017, with advice that can help make Oracle projects ...

## SearchSAP

• ### ControlPanelGRC app eases Steelcase's compliance pain

When Steelcase's SAP environment grew in size and complexity, it turned to Symmetry ControlPanelGRC to save time, have more ...

• ### Translytical data platforms emerge with SAP HANA as a leader

SAP HANA is a leading translytical platform, according to Forrester, and consulting firm Convergent IS says the combination of ...

• ### SAP HANA and Esri combine for geospatial database platform

SAP and Esri are combining SAP HANA's in-memory database capabilities with Esri geospatial applications, and utilities are taking...

## SearchSQLServer

• ### Microsoft SQL Operations Studio eases SQL Server admin tasks

SQL Operations Studio simplifies routine administration of SQL Server and Azure SQL databases, making database development and ...

• ### Meltdown and Spectre fixes eyed for SQL Server performance issues

Microsoft has responded to the Spectre and Meltdown chip vulnerabilities with patches and other fixes. But IT teams need to sort ...

• ### Five SQL Server maintenance steps you should take -- ASAP

Putting off SQL Server administration tasks can lead to database problems. Enact these often-neglected maintenance items to help ...

## SearchSalesforce

• ### Colorado modernizes with Salesforce for government projects

Colorado licenses Service Cloud and other Salesforce technologies to improve its citizens benefit program.

• ### Salesforce gets a blockchain distributed ledger tool

Blockchain technology is the ultimate connectivity layer, and it can be used to help solve thorny customer service issues when ...

• ### Salesforce buys Attic Labs, adding to Quip capabilities

Quip receives back-end capabilities with open source database after Salesforce purchase of Attic Labs.

Close