R Programming language Interview Questions & Answers

  1. Question 1. Explain The Data Import In R Language.?

    Answer :

    R provides to import data in R language. To begin with the R commander GUI, user should type the commands in the command Rcmdr into the console.

    Data can be imported in R language in 3 ways such as:

    1. Select the data set in the dialog box or enter the name of the data set as required.
    2. Data is entered directly using the editor of R Commander via Data->New Data Set. This works good only when the data set is not too large.
    3. Data can also be imported from a URL or from plain text file (ASCII), or from any statistical package or from the clipboard.
  2. Question 2. Explain How To Communicate The Outputs Of Data Analysis Using R Language.?

    Answer :

    Combine the data, code and analysis results in a single document using knitr for Reproducible research done. Helps to verify the findings, add to them and engage in conversations. Reproducible research makes it easy to redo the experiments by inserting new data values and applying it to different various problems.

  3. DBMS Interview Questions

  4. Question 3. What Is R?

    Answer :

    R is a programming language which is used for developing statistical software and data analysis.

  5. Question 4. How R Commands Are Written?

    Answer :

    By using # at the starting of the line of code like #division commands are written.

  6. C++ Tutorial

  7. Question 5. What Is T-tests() In R?

    Answer :

    It is used to determine that the means of two groups are equal or not by using t.test() function.

  8. C++ Interview Questions

  9. Question 6. What Are The Disadvantages Of R Programming?

    Answer :

    The disadvantages are:-

    1. Lack of standard GUI
    2. Not good for big data.
    3. Does not provide spreadsheet view of data.
  10. Question 7. What Is The Use Of With () And By () Function In R?

    Answer :

    with() function applies an expression to a dataset.

    #with(data,expression)

    By() function applies a function t each level of a factors.

    #by(data,factorlist,function)

  11. Java Tutorial
    C & Data Structures Interview Questions

  12. Question 8. In R Programming, How Missing Values Are Represented?

    Answer :

    In R missing values are represented by NA which should be in capital letters.

  13. Question 9. What Is The Use Of Subset() And Sample() Function In R?

    Answer :

    Subset() is used to select the variables and observations and sample() function is used to  generate  a random sample of the size n from a dataset.

  14. Java Interview Questions

  15. Question 10. Explain What Is Transpose.?

    Answer :

    Transpose is used for reshaping of the data which is used for analysis. Transpose is performed by t() function.

  16. Go (programming language) Tutorial

  17. Question 11. What Are The Advantages Of R?

    Answer :

    The advantages are:-

    1. It is used for managing and manipulating of data.
    2. No license restrictions
    3. Free and open source software.
    4. Graphical capabilities of R are good.
    5. Runs on many Operating system and different hardware and also run on 32 & 64 bit processors etc.
  18. Go (programming language) Interview Questions

  19. Question 12. What Is The Function Used For Adding Datasets In R?

    Answer :

    For adding two datasets rbind() function is used but the column of two datasets must be same.

    Syntax: rbind(x1,x2……) where x1,x2: vector, matrix, data frames.

  20. DBMS Interview Questions

  21. Question 13. How You Can Produce Co-relations And Covariances?

    Answer :

    Cor-relations is produced by cor() and covariances is produced by cov() function.

  22. F Sharp (programming language) Tutorial

  23. Question 14. What Is Difference Between Matrix And Dataframes?

    Answer :

    Dataframe can contain different type of data but matrix can contain only similar type of data.

  24. Question 15. What Is Difference Between Lapply And Sapply?

    Answer :

    lapply is used to show the output in the form of list whereas sapply is used to show the output in the form of vector or data frame.

  25. F Sharp (programming language) Interview Questions

  26. Question 16. What Is The Difference Between Seq(4) And Seq_along(4)?

    Answer :

    Seq(4) means vector from 1 to 4 (c(1,2,3,4)) whereas seq_along(4) means a vector of the  length(4) or 1(c(1)).

  27. R Programming language Tutorial

  28. Question 17. Explain How You Can Start The R Commander Gui.?

    Answer :

    rcmdr command is used to start the R commander GUI.

  29. C preprocessor Interview Questions

  30. Question 18. What Is The Memory Limit Of R?

    Answer :

    In 32 bit system memory limit is 3Gb but most versions limited to 2Gb and in 64 bit system memory limit is 8Tb.

  31. C++ Interview Questions

  32. Question 19. How Many Data Structures R Has?

    Answer :

    There are 5 data structure in R i.e. vector, matrix, array which are of homogenous type and other two are list and data frame which are heterogeneous.

  33. D Programming Language Tutorial

  34. Question 20. Explain How Data Is Aggregated In R.?

    Answer :

    There are two methods that is collapsing data by using one or more BY variable and other is aggregate() function in which BY variable should be in list.

  35. D Programming Language Interview Questions

  36. Question 21. How Many Sorting Algorithms Are Available?

    Answer :

    There are 5 types of sorting algorithms are used which are:-

    1. Bubble Sort
    2. Selection Sort
    3. Merge Sort
    4. Quick Sort
    5. Bucket Sort
  37. Question 22. How To Create New Variable In R Programming?

    Answer :

    For creating new variable assignment operator ‘<-’ is used For e.g. mydata$sum <- mydata$x1 + mydata$x2.

  38. Question 23. What Are R Packages?

    Answer :

    Packages are the collections of data, R functions and compiled code in a well-defined format and these packages are stored in library.

  39. Embedded C Interview Questions

  40. Question 24. What Is The Workspace In R?

    Answer :

    Workspace is the current R working environment which includes any user defined objects like vector, lists etc.

  41. C & Data Structures Interview Questions

  42. Question 25. What Is The Function Which Is Used For Merging Of Data Frames Horizontally In R?

    Answer :

    Merge()function is used to merge two data frames

    Eg: Sum<-merge(data frame1,data frame 2,by=’ID’)

     

  43. Question 26. What Is The Function Which Is Used For Merging Of Data Frames Vertically In R?

    Answer :

    rbind() function is used to merge two data frames vertically.

    Eg.

    Sum<- rbind(data frame1,data frame 2)

  44. Question 27. What Is The Power Analysis?

    Answer :

    It is used for experimental design .It is used to determine the effect of given sample size.

  45. Java Interview Questions

  46. Question 28. Which Package Is Used For Power Analysis In R?

    Answer :

    Pwr package is used for power analysis in R.

  47. Question 29. Which Method Is Used For Exporting The Data In R?

    Answer :

    There are many ways to export the data into another formats like SPSS, SAS , Stata , Excel Spreadsheet.

  48. Question 30. Which Packages Are Used For Exporting Of Data?

    Answer :

    For excel xlsReadWrite package is used and for sas,spss ,stata foreign package is implemented.

  49. Question 31. How Impossible Values Are Represented In R?

    Answer :

    In R NaN is used to represent impossible values.

  50. Question 32. Which Command Is Used For Storing R Object Into A File?

    Answer :

    Save command is used for storing R objects into a file.

    Syntax: >save(z,file=”z.Rdata”)

  51. Question 33. Which Command Is Used For Restoring R Object From A File?

    Answer :

    load command is used for storing R objects from a file.

    Syntax: >load(”z.Rdata”)

  52. Go (programming language) Interview Questions

  53. Question 34. What Is The Use Of Coin Package In R?

    Answer :

    Coin package is used to achieve the re randomization or permutation based statistical tests.

  54. Question 35. Which Function Is Used For Sorting In R?

    Answer :

    order() function is used to perform the sorting.

  55. Question 36. What Happens When The Application Object Does Not Handle An Event?

    Answer :

    The event will be dispatched to your delegate for processing.

  56. F Sharp (programming language) Interview Questions

  57. Question 37. Explain App Specific Objects Which Store The App Contents.?

    Answer :

    The app specific objects are Data model objects that store app’s contents.

  58. Question 38. Explain The Purpose Of Using Uiwindow Object?

    Answer :

    UIWindow object coordinates the one or more views presenting on the screen.

  59. Question 39. How To Create Axes In The Graph?

    Answer :

    Using axes() function custom axes are created.

  60. Question 40. What Is The Use Of Abline() Function?

    Answer :

    abline() function is add the reference line to a graph.

    Syntax:-

    abline(h=yvalues, v=xvalues)

  61. C preprocessor Interview Questions

  62. Question 41. Why Vcd Package Is Used?

    Answer :

    vcd package provides different methods for visualizing multivariate categorical data.

  63. Question 42. What Is Ggobi?

    Answer :

    GGobi is an open source program for visualization for exploring high dimensional typed data.

  64. D Programming Language Interview Questions

  65. Question 43. What Is Iplots?

    Answer :

    It is a package which provide bar plots, mosaic plots, box plots, parallel plots, scatter plots and histograms.

  66. Question 44. What Is The Use Of Lattice Package?

    Answer :

    lattice package is to improve on base R graphics by giving better defaults and it have the ability to easily display multivariate relationships.

  67. Question 45. What Is Fitdistr() Function?

    Answer :

    It is used to provide the maximum likelihood fitting of univariate distributions. It is defined under the MASS package.

  68. Question 46. Which Data Structures Are Used To Perform Statistical Analysis And Create Graphs.?

    Answer :

    Data structures are vectors, arrays, data frames and matrices.

  69. Question 47. What Is The Use Of Sink() Function?

    Answer :

    It defines the direction of output.

  70. Question 48. Why Library() Function Is Used?

    Answer :

    This function is used to show the packages which are installed.

  71. Question 49. Why Search() Function Is Used?

    Answer :

    By this function we see that which packages are currently loaded.

  72. Question 50. On Which Type Of Data Binary Operators Are Worked?

    Answer :

    Binary operators are worked on matrices, vectors and scalars.

  73. Question 51. What Is The Use Of Doby Package?

    Answer :

    It is used to define the desired table using function and model formula.

  74. Question 52. Which Function Is Used To Create Frequency Table?

    Answer :

    Frequency table is created by table() function.

  75. Question 53. What Is The Of Use Matrix Package?

    Answer :

    Matrix package includes those function which support sparse and dense matrices like Lapack, BLAS etc.

  76. Question 54. Define Matlab Package.?

    Answer :

    Matlab package includes those wrapper functions and variable which are used to replicate matlab function calls.

  77. Question 55. What We Use Party Package?

    Answer :

    It is used to provide a non-parametric regression for ordinal, nominal, censored and multivariate responses.

  78. Question 56. Define Cluster.stats() ?

    Answer :

    It is define in fpc package which provide a method for comparing the similarity of two clusters solution using different validation criteria.

  79. Question 57. What Is Pvclust() Function?

    Answer :

    It comes under the pvclust package which provides p-values for hierarchical clustering.

  80. Question 58. Which Function Performs Classical Multidimensional Scaling?

    Answer :

    cmdscale() function is used to perform classical multidimensional scaling.

  81. Question 59. What Is The Use Of Boot.sem() Function?

    Answer :

    It is used to bootstrap the structural equation model.

  82. Question 60. What Is Factominer?

    Answer :

    It is a package which includes quantitative and qualitative variables. It also includes supplementary variables and observations.

  83. Question 61. What Is Principal() Function?

    Answer :

    It is define in psych package which is used to rotate and extract the principal components.

  84. Question 62. Define Auto.arima().?

    Answer :

    It is used to handle the seasonal as well as non-seasonal ARIMA models.

  85. Question 63. What Is The Use Of Forecast Package?

    Answer :

    It provides the functions which are used for automatic selection of ARIMA and exponential models.

  86. Question 64. Define Lda().?

    Answer :

    lda() is used to print the discriminant functions which is based on centered variable.

  87. Question 65. What Is The Use Of Mass Package?

    Answer :

    MASS functions include those functions which performs linear and quadratic discriminant function analysis.

  88. Question 66. What Is Coxph()?

    Answer :

    It is a function which is used to model the hazard function on the set of predictor variable.

  89. Question 67. Define Survival Analysis.?

    Answer :

    It includes number of techniques which is used for modeling the time to an event.

  90. Question 68. Define Poison Regression.?

    Answer :

    It is used to predict the outcome variable which represents counts from the given set of continuous predictor variable.

  91. Question 69. What Is Logistic Regression?

    Answer :

    Logistic regression is used to predict the binary outcome from the given set of continuous predictor variables.

  92. Question 70. Which Variables Are Represented By Upper Case Letters?

    Answer :

    Categorical factors are represented by upper case letters.

  93. Question 71. Which Variables Are Represented By Lower Case Letters?

    Answer :

    Numerical variables are represented by lower case letters.

  94. Question 72. Define Barlett.test().?

    Answer :

    Barlett.test() is used to provide a parametric k-sample test of the equality of variances.

  95. Question 73. What Is Fligner.test()?

    Answer :

    It is a function which provides a non-parametric k sample test of the equality of variances.

  96. Question 74. What Is The Use Of Manova?

    Answer :

    By using MANOVA we can test more than one dependent variable simultaneously.

  97. Question 75. Define Plotmeans().?

    Answer :

    It is define under gplots package which includes confidence intervals and it produces mean plot for single factors.

  98. Question 76. What Is Robustbase?

    Answer :

    It is a package which provides basic robust statistics including model selection methods.

  99. Question 77. Why Car Package Is Used?

    Answer :

    It  provide a variety of regression including scatter plots, variable plots and it also enhanced diagnostic.

  100. Question 78. Define Relaimpo Package.?

    Answer :

    It is used to measure the relative importance of each of the predictor in the model.

  101. Question 79. Define Stepaic() Function.?

    Answer :

    It is define under the MASS package which performs stepwise model selection under exact AIC.

  102. Question 80. What Is The Use Of Diagnostic Plots?

    Answer :

    It is used to check the normality, heteroscedasticity and influential observations.

  103. Question 81. What Is Npmc?

    Answer :

    It is a package which gives nonparametric multiple comparisons.