Important Frequently Asked Questions about R

This post is about some frequently asked Questions about R Language. These questions will help you prepare for examinations and interviews.

Frequently Asked Questions About R

Question: What is a Compiler in R Language?
Answer: A compiler is software that transforms computer code (source code) to another computer language (target language, i.e., object code).

Question: What is a package in R Language?
Answer: The R package is a collection of R functions, compiled code, sample data, and help documentation. The R packages are stored in a directory called “library” in the R environment. The R language also installed a set of packages during installation.

Question: What is JIT?
Answer:
JIT standards for “Just in Time” compiler. It is a method to improve the run-time performance of a computer program.

Question: What is procedural Programming in R Language?
Answer:
Procedural programming is derived from structured programming and it is based on the concept of procedure call. Procedures are also known as routines, subroutines, or functions. It contains a series of computational steps to be carried out. Any procedure may be called (at any point) during a program’s execution.

Question: What is the recycling of elements in a vector?
Answer: When a mathematical operation (such as addition, subtraction, multiplication, division, etc) is performed on two vectors of different lengths (the number of elements in both vectors is different), the element having a shorter length is reused to complete the mathematical operations.

vect1 <- c(4, 1, 4, 5, 6, 9)
vect2 <- c(2, 5)

vect1 * vect2 

###
8, 5, 8, 25, 12, 45

The elements of vect2 are recycled to complete the operation of all elements of vect1.

Question: What is the difference between a data frame and a matrix in R Language?
Answer: In R, the data frame contains heterogeneous data (different columns of the data frame may have different types of variable) while a matrix contains homogeneous data (all the columns of the matrix have the same type of variable). In a matrix, similar data types can be stored while in a data frame, different types of data can be stored.

See Questions about R language Missing Values

R Basics

Here are R FAQS about R Basics. Questions and answers will be updated frequently and on the demand of visitors.

Question: On what Operating Systems R Language can Run.
Answer: R Language can run on Unix, Linux, and Windows Operating System.

Question: On what machine R can Run?
Answer: R is developed for Unix-like, Windows and Mac families of operating systems. The current version of R Language is configured to run on machine such as CPU-Linux-gnu for i386, amd64, alpha, arm/armel, hppa, ia64, m68k, mips/mipsel, PowerPC, s390 and Sparc CPUs, i386-hurd-gnu, cpu-kfreebsd-gnu for i386 and amd64, PowerPC-apple-darwin, mips-sgi-irix, i386-freebsd, rs6000-ibm-aix and sparc-sun-Solaris.

Question: What is the current version of R?
Answer: The current released version (at the time of this post) of R is 3.2.2. The current version is 3.6.1 (Action of the Toes) released on 2019-07-05.

Question: How and where from R can be obtained?
Answer: Sources, binaries, and documentation of R language can be obtained via the Comprehensive R Archive Network (CRAN).

Question: How to install R on Windows Operating System?
Answer: The “bin/windows” directory of CRAN site contains binaries for a base distribution and add-on packages from CRAN to run on Windows XP, Vista, Windows 7, etc (32-bit or 64bit versions of Windows) on ix86 and x86_64 chips.

Question: What is CRAN?
Answer: The CRAN is “Comprehensive R Archive Network”. CRAN is a collection of sites which carry identical material, consisting R distribution(s), the contributed extensions, documentation for R and binaries.

The CRAN master site is https://CRAN.R-project.org at WU (Wirtschaftsuniversität Wien) in Austria.

Following are some mirrors from CRAN:
https://cran.wu.ac.at/    (Wirtschaftsuniversität Wien, Austria)
https://cran.ms.unimelb.edu.au/    (University of Melbourne, Australia)
https://cran-r.c3sl.ufpr.br/    (Universidade Federal do Paraná, Brazil)
https://stat.ethz.ch/CRAN/    (ETH Zürich, Switzerland)
https://mirrors.dotsrc.org/cran/    (dotsrc.org, Aalborg, Denmark)
https://cran.rediris.es/    (Spanish National Research Network, Madrid, Spain)
http://cran.dcc.fc.up.pt/    (Universidade do Porto, Portugal)
https://www.stats.bris.ac.uk/R/    (University of Bristol, United Kingdom)

For further R Basics Questions following the R FAQ link: Hornik, K., (2015). R FAQs, https://CRAN.R-project.org/doc/FAQ/R-FAQ.html.

x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security