ArticleslgStudy

computer science

Programming with Big Data in R

Programming with Big Data in R is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Programming with Big Data in R rather than just read about it. In short: Programming with Big Data in R (pbdR) is a series of R packages and an environment for statistical computing with big data by using high-performance statistical computation. The pbdR uses the same programming language as R with S3/S4 classes and methods which is used among statisticians and data miners for developing statistical software.

Programming with Big Data in R — main illustration
Programming with Big Data in R — illustration

Key takeaways

  • Programming with Big Data in R belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Programming with Big Data in R to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Programming with Big Data in R from memory before moving on to harder problems.

Reference excerpt

Programming with Big Data in R (pbdR) is a series of R packages and an environment for statistical computing with big data by using high-performance statistical computation. The pbdR uses the same programming language as R with S3/S4 classes and methods which is used among statisticians and data miners for developing statistical software. The significant difference between pbdR and R code is that pbdR mainly focuses on distributed memory systems, where data are distributed across several processors and analyzed in a batch mode, while communications between processors are based on MPI that is easily used in large high-performance computing (HPC) systems. R system mainly focuses on single multi-core machines for data analysis via an interactive mode such as GUI interface. Two main implementations in R using MPI are Rmpi and pbdMPI of pbdR.

The pbdR built on pbdMPI uses SPMD parallelism where every processor is considered as worker and owns parts of data. The SPMD parallelism introduced in mid 1980 is particularly efficient in homogeneous computing environments for large data, for example, performing singular value decomposition on a large matrix, or performing clustering analysis on high-dimensional large data. On the other hand, there is no restriction to use manager/workers parallelism in SPMD parallelism environment. The Rmpi uses manager/workers parallelism where one main processor (manager) serves as the control of all other processors (workers). The manager/workers parallelism introduced around early 2000 is particularly efficient for large tasks in small clusters, for example, bootstrap method and Monte Carlo simulation in applied statistics since i.i.d. assumption is commonly used in most statistical analysis. In particular, task pull parallelism has better performance for Rmpi in heterogeneous computing environments. The idea of SPMD parallelism is to let every processor do the same amount of work, but on different parts of a large data set. For example, a modern GPU is a large collection of slower co-processors that can simply apply the same computation on different parts of relatively smaller data, but the SPMD parallelism ends up with an efficient way to obtain final solutions (i.e. time to solution is shorter).

Package design Programming with pbdR requires usage of various packages developed by pbdR core team. Packages developed are the following.

Among these packages, pbdMPI provides wrapper functions to MPI library, and it also produces a shared library and a configuration file for MPI environments. All other packages rely on this configuration for installation and library loading that avoids difficulty of library linking and compiling. All other packages can directly use MPI functions easily.

pbdMPI --- an efficient interface to MPI either OpenMPI or MPICH2 with a focus on Single Program/Multiple Data (SPMD) parallel programming style pbdSLAP --- bundles scalable dense linear algebra libraries in double precision for R, based on ScaLAPACK version 2.0.2 which includes several scalable linear algebra packages (namely BLACS, PBLAS, and ScaLAPACK). pbdNCDF4 --- interface to Parallel Unidata NetCDF4 format data files pbdBASE --- low-level ScaLAPACK codes and wrappers pbdDMAT --- distributed matrix classes and computational methods, with a focus on linear algebra and statistics pbdDEMO --- set of package demonstrations and examples, and this unifying vignette pmclust --- parallel model-based clustering using pbdR pbdPROF --- profiling package for MPI codes and visualization of parsed stats pbdZMQ --- interface to ØMQ remoter --- R client with remote R servers pbdCS --- pbdR client with remote pbdR servers pbdRPC --- remote procedure call kazaam --- very tall and skinny distributed matrices pbdML --- machine learning toolbox Among those packages, the pbdDEMO package is a collection of 20+ package demos which offer example uses of the various pbdR packages, and contains a vignette that offers detailed explanations for the demos and provides some mathematical or statistical insight.

Examples

Example 1 Hello World! Save the following code in a file called "demo.r"

and use the command

to execute the code where Rscript is one of command line executable program.

Example 2 The following example modified from pbdMPI illustrates the basic syntax of the language of pbdR. Since pbdR is designed in SPMD, all the R scripts are stored in files and executed from the command line via mpiexec, mpirun, etc. Save the following code in a file called "demo.r"

and use the command

to execute the code where Rscript is one of command line executable program.

Example 3 The following example modified from pbdDEMO illustrates the basic ddmatrix computation of pbdR which performs singular value decomposition on a given matrix. Save the following code in a file called "demo.r"

and use the command

to execute the code where Rscript is one of command line executable program.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Programming with Big Data in R

Start with the simplest possible case. Write down what Programming with Big Data in R claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Programming with Big Data in R before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Programming with Big Data in R ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Programming with Big Data in R

In research
Programming with Big Data in R appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Programming with Big Data in R in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Programming with Big Data in R is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cross-platform free software, Data-centric programming languages, Data mining and machine learning software, so understanding it makes those chapters shorter.
In everyday life
Look for Programming with Big Data in R outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Programming with Big Data in R in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Programming with Big Data in R means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Programming with Big Data in R out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Programming with Big Data in R in simple terms?

Programming with Big Data in R (pbdR) is a series of R packages and an environment for statistical computing with big data by using high-performance statistical computation. The pbdR uses the same programming language as R with S3/S4 classes and methods which is used among statisticians and data mi…

Why does Programming with Big Data in R matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Programming with Big Data in R?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Programming with Big Data in R.

Tags

  • Cross-platform free software
  • Data-centric programming languages
  • Data mining and machine learning software
  • Free statistical software
  • Functional languages
  • Numerical analysis software for Linux
  • Numerical analysis software for Windows
  • Numerical analysis software for macOS
  • Parallel computing

Keep exploring