{"id":27120,"date":"2022-02-19T10:46:30","date_gmt":"2022-02-19T10:46:30","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=27120"},"modified":"2022-12-23T06:48:59","modified_gmt":"2022-12-23T06:48:59","slug":"top-50-r-language-interview-questions-and-answers","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/top-50-r-language-interview-questions-and-answers\/","title":{"rendered":"Top 50 R language Interview Questions And Answers"},"content":{"rendered":"\n<ol class=\"wp-block-list\"><li><strong>What is R Language?<\/strong><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.ytimg.com\/vi\/rNRKmuNNjCY\/hqdefault.jpg\" alt=\"What is R Programming? - YouTube\" \/><figcaption>What is R Language<\/figcaption><\/figure>\n\n\n\n<p>R is data analysis software which is used by analysts, quants, statisticians, data scientists and others.<\/p>\n\n\n\n<p><strong>2. Explain how you can start the R commander GUI?<\/strong><\/p>\n\n\n\n<p>Typing the command, (\u201cRcmdr\u201d) into the R console starts the R commander GUI.<\/p>\n\n\n\n<p><strong>3.<\/strong> <strong>In R how you can import Data?<\/strong><\/p>\n\n\n\n<p>You use R commander to import Data in R, and there are three ways through which you can enter data into it<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You can enter data directly via Data \uf0e0 New Data Set<\/li><li>Import data from a plain text (ASCII) or other files (SPSS, Minitab, etc.)<\/li><li>Read a data set either by typing the name of the data set or selecting the data set in the dialog box<\/li><\/ul>\n\n\n\n<p><strong>4. List out some of the function that R provides?<\/strong><\/p>\n\n\n\n<p>The function that R provides are<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Mean<\/strong><\/li><li><strong>Median<\/strong><\/li><li><strong>Distribution<\/strong><\/li><li><strong>Covariance<\/strong><\/li><li><strong>Regression<\/strong><\/li><li><strong>Non-linear<\/strong><\/li><li><strong>Mixed Effects<\/strong><\/li><li><strong>GLM<\/strong><\/li><li><strong>GAM. etc.<\/strong><\/li><\/ul>\n\n\n\n<p><strong>5. Mention what does not \u2018R\u2019 language do?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Though R programming can easily connects to DBMS is not a database<\/li><li>R does not consist of any graphical user interface<\/li><li>Though it connects to Excel\/Microsoft Office easily, R language does not provide any spreadsheet view of data.<\/li><\/ul>\n\n\n\n<p><strong>6. Explain how R commands are written?<\/strong><\/p>\n\n\n\n<p>In R, anywhere in the program you have to preface the line of code with a #sign, for example<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>subtraction<\/li><li>division<\/li><li>note order of operations exists<\/li><\/ul>\n\n\n\n<p><strong>7. Mention how you can produce co-relations and covariances?<\/strong><\/p>\n\n\n\n<p>You can produce co-relations by the cor () function to produce co-relations and cov () function to produce covariances.<\/p>\n\n\n\n<p><strong>8.<\/strong> <strong>How can you save your data in R?<\/strong><\/p>\n\n\n\n<p>To save data in R, there are many ways, but the easiest way of doing this is<\/p>\n\n\n\n<p>Go to Data &gt; Active Data Set &gt; Export Active Data Set and a dialogue box will appear, when you click ok the dialogue box let you save your data in the usual way.<\/p>\n\n\n\n<p><strong>9. Explain what is t-tests in R?<\/strong><\/p>\n\n\n\n<p>In R, the t.test () function produces a variety of t-tests. T-test is the most common test in statistics and used to determine whether the means of two groups are equal to each other.<\/p>\n\n\n\n<p><strong>10. Explain what is With () and By () function in R is used for?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>With() function is similar to DATA in SAS, it apply an expression to a dataset.<\/li><li>BY() function applies a function to each level of factors. It is similar to BY processing in SAS.<\/li><\/ul>\n\n\n\n<p><strong>11. Explain general format of Matrices in R?<\/strong><\/p>\n\n\n\n<p>General format is<\/p>\n\n\n\n<p>________________________________________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">Mymatrix<span class=\"hljs-tag\">&lt; <span class=\"hljs-attr\">-<\/span> <span class=\"hljs-attr\">matrix<\/span> (<span class=\"hljs-attr\">vector<\/span>, <span class=\"hljs-attr\">nrow<\/span>=<span class=\"hljs-string\">r<\/span> , <span class=\"hljs-attr\">ncol<\/span>=<span class=\"hljs-string\">c<\/span> , <span class=\"hljs-attr\">byrow<\/span>=<span class=\"hljs-string\">FALSE,<\/span>\r\n<span class=\"hljs-attr\">dimnames<\/span> = <span class=\"hljs-string\">list<\/span> ( <span class=\"hljs-attr\">char_vector_<\/span> <span class=\"hljs-attr\">rowname<\/span>, <span class=\"hljs-attr\">char_vector_colnames<\/span>))\n<span class=\"hljs-attr\">_________________________________________________<\/span>\n<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>12. What are the data structures in R that is used to perform statistical analyses and create graphs?<\/strong><\/p>\n\n\n\n<p>R has data structures like<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Vectors<\/li><li>Matrices<\/li><li>Arrays<\/li><li>Data frames<\/li><\/ul>\n\n\n\n<p><strong>13. Explain what is transpose?<\/strong><\/p>\n\n\n\n<p>For re-shaping data before, analysis R provides various method and transpose are the simplest method of reshaping a dataset. To transpose a matrix or a data frame t () function is used.<\/p>\n\n\n\n<p><strong>14. In R how missing values are represented ?<\/strong><\/p>\n\n\n\n<p>In R missing values are represented by NA (Not Available), why impossible values are represented by the symbol NaN (not a number).<\/p>\n\n\n\n<p><strong>15. What is the function used for adding datasets in R?<\/strong><\/p>\n\n\n\n<p>rbind function can be used to join two data frames (datasets). The two data frames must have the same variables, but they do not have to be in the same order.<\/p>\n\n\n\n<p><strong>16. Explain how data is aggregated in R?<\/strong><\/p>\n\n\n\n<p>By collapsing data in R by using one or more BY variables, it becomes easy. When using the aggregate() function the BY variable should be in the list.<\/p>\n\n\n\n<p><strong>17. What is the use of subset() function and sample() function in R ?<\/strong><\/p>\n\n\n\n<p>In R, subset() functions help you to select variables and observations while through sample() function you can choose a random sample of size n from a dataset.<\/p>\n\n\n\n<p><strong>18. What are the different data structures in R? Briefly explain about them.<\/strong><\/p>\n\n\n\n<p>Broadly speaking these are Data Structures available in R:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Data Structure<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>Vector<\/td><td>A vector is a sequence of data elements of the same basic type. Members in a vector are called components.<\/td><\/tr><tr><td>List<\/td><td>Lists are the R objects which contain elements of different types like \u2212 numbers, strings, vectors or another list inside it.<\/td><\/tr><tr><td>Matrix<\/td><td>A matrix is a two-dimensional data structure. Matrices are used to bind vectors from the same length. All the elements of a matrix must be of the same type (numeric, logical, character, complex).<\/td><\/tr><tr><td>Dataframe<\/td><td>A data frame is more generic than a matrix, i.e different columns can have different data types (numeric, character, logical, etc). It combines features of matrices and lists like a rectangular list.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>19.<\/strong> <strong>What are the different components of grammar of graphics?<\/strong><\/p>\n\n\n\n<p>Broadly speaking these are different components in grammar of graphics:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Data layer<\/li><li>Aesthetics layer<\/li><li>Geometry layer<\/li><li>Facet layer<\/li><li>Co-ordinate layer<\/li><li>Themes layer<\/li><\/ul>\n\n\n\n<p><strong>19. How can you load a .csv file in R?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Loading a .csv file in R is quite easy.<\/li><li>All you need to do is use the \u201cread.csv()\u201d function and specify the path of the file.<\/li><\/ul>\n\n\n\n<p>____________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">house&lt;-read.csv(<span class=\"hljs-string\">\"C:\/Users\/John\/Desktop\/house.csv\"<\/span>)\n___________________________\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>20.<\/strong> <strong>\u00a0How do you install a package in R?<\/strong><\/p>\n\n\n\n<p>The below command is used to install a package in R:<\/p>\n\n\n\n<p>____________________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">install.packages(\u201c<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">package_name<\/span>&gt;<\/span>\u201d)\n_________________________________\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>21. Name some packages in R, which can be used for data imputation?<\/strong><\/p>\n\n\n\n<p>These are some packages in R which can used for data imputation<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>MICE<\/li><li>Amelia<\/li><li>missForest<\/li><li>Hmisc<\/li><li>Mi<\/li><li>imputeR <\/li><\/ul>\n\n\n\n<p><strong>22. Tell me something about shinyR?<\/strong><\/p>\n\n\n\n<p>Shiny is an R package that makes it easy to build interactive web apps straight from R. You can host standalone apps on a webpage or embed them in Rmarkdown documents or build dashboards. You can also extend your Shiny apps with CSS themes, htmlwidgets, and JavaScript actions.<\/p>\n\n\n\n<p><strong>23.<\/strong> <strong>What packages are used for data mining in R?<\/strong><\/p>\n\n\n\n<p>Some packages used for data mining in R:<\/p>\n\n\n\n<p><strong>data.table<\/strong>&#8211; provides fast reading of large files<br><strong>rpart and caret<\/strong>&#8211; for machine learning models.<br><strong>Arules<\/strong>&#8211; for associaltion rule learning.<br><strong>GGplot<\/strong>&#8211; provides varios data visualization plots.<br><strong>tm<\/strong>&#8211; to perform text mining.<br><strong>Forecast<\/strong>&#8211; provides functions for time series analysis<\/p>\n\n\n\n<p><strong>24<\/strong>. <strong><strong>What do you know about the rattle package in R?<\/strong><\/strong><\/p>\n\n\n\n<p>Rattle is a popular GUI for data mining using R. It presents statistical and visual summaries of data, transforms data so that it can be readily modelled, builds both unsupervised and supervised machine learning models from the data, presents the performance of models graphically, and scores new datasets for deployment into production. A key features is that all of your interactions through the graphical user interface are captured as an R script that can be readily executed in R independently of the Rattle interface.<\/p>\n\n\n\n<p><strong>25. Explain the data import in R language?<\/strong><\/p>\n\n\n\n<p>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:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Select the data set in the dialog box or enter the name of the data set as required.<\/li><li>Data is entered directly using the editor of R Commander via Data-&gt;New Data Set. This works good only when the data set is not too large.<\/li><li>Data can also be imported from a URL or from plain text file (ASCII), or from any statistical package or from the clipboard.<\/li><\/ul>\n\n\n\n<p><strong>26.<\/strong> <strong>\u00a0Explain how to communicate the outputs of data analysis using R language?<\/strong><\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p><strong>27. Difference between library () and require () functions in R language?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Library()<\/strong><\/td><td><strong>Require()<\/strong><\/td><\/tr><tr><td>Library () function gives an error message display, if the desired package cannot be loaded.<\/td><td>Require () function is used inside function and throws a warning messages whenever a particular package is not Found<\/td><\/tr><tr><td>It loads the packages whether it is already loaded or not,<\/td><td>It just checks that it is loaded, or loads it if it isn\u2019t (use in functions that rely on a certain package). The documentation explicitly states that neither function will reload an already loaded package.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Consider a related program for the above differentiation.<\/p>\n\n\n\n<p>___________________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-comment\">&lt;!-- wp:paragraph --&gt;<\/span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>if(!require(package, character.only=T, quietly=T)) {<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n<span class=\"hljs-comment\">&lt;!-- \/wp:paragraph --&gt;<\/span>\n\n<span class=\"hljs-comment\">&lt;!-- wp:paragraph --&gt;<\/span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>install.packages (package)<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n<span class=\"hljs-comment\">&lt;!-- \/wp:paragraph --&gt;<\/span>\n\n<span class=\"hljs-comment\">&lt;!-- wp:paragraph --&gt;<\/span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>library(package, character.only=T)<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n<span class=\"hljs-comment\">&lt;!-- \/wp:paragraph --&gt;<\/span>\n\n<span class=\"hljs-comment\">&lt;!-- wp:paragraph --&gt;<\/span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n<span class=\"hljs-comment\">&lt;!-- \/wp:paragraph --&gt;<\/span>\n___________________________________\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>For multiple packages you can use<\/p>\n\n\n\n<p>_____________________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">for<\/span>(package <span class=\"hljs-keyword\">in<\/span> c(<span class=\"hljs-string\">''<\/span>, <span class=\"hljs-string\">''<\/span>)) {\r\n\r\n<span class=\"hljs-keyword\">if<\/span>(!<span class=\"hljs-built_in\">require<\/span>(package, character.only=T, quietly=T)) {\r\n\r\ninstall.packages (package)\r\n\r\nlibrary(package, character.only=T)\r\n\r\n}\r\n\r\n}\n___________________________________\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>28.<\/strong> <strong>What are the disadvantages of R Programming?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"510\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Disadvantages-of-R.png\" alt=\"\" class=\"wp-image-27132\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Disadvantages-of-R.png 734w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Disadvantages-of-R-300x208.png 300w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><figcaption>Disadvantages of R<\/figcaption><\/figure>\n\n\n\n<p>The disadvantages are:-<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Lack of standard GUI<\/li><li>Not good for big data.<\/li><li>Does not provide spreadsheet view of data.<\/li><\/ul>\n\n\n\n<p><strong>29.<\/strong> <strong>What is the use of With () and By () function in R?<\/strong><\/p>\n\n\n\n<p>with() function applies an expression to a dataset.<\/p>\n\n\n\n<p>___________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-id\">#with<\/span>(<span class=\"hljs-selector-tag\">data<\/span>,<span class=\"hljs-selector-tag\">expression<\/span>)\n__________________________\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>By() function applies a function t each level of a factors.<\/p>\n\n\n\n<p>_________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-id\">#by<\/span>(<span class=\"hljs-selector-tag\">data<\/span>,<span class=\"hljs-selector-tag\">factorlist<\/span>,<span class=\"hljs-selector-tag\">function<\/span>)\n_________________________\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>30. \u00a0In R programming, how missing values are represented?<\/strong><\/p>\n\n\n\n<p>In R missing values are represented by NA which should be in capital letters.<\/p>\n\n\n\n<p><strong>31.<\/strong> <strong>\u00a0Explain what is transpose?<\/strong><\/p>\n\n\n\n<p>Transpose is used for reshaping of the data which is used for analysis. Transpose is performed by t() function. <\/p>\n\n\n\n<p><strong>32.<\/strong> <strong>What are the advantages of R?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"543\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Advantages-of-R.png\" alt=\"\" class=\"wp-image-27131\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Advantages-of-R.png 692w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Advantages-of-R-300x235.png 300w\" sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><figcaption>Advantages of R<\/figcaption><\/figure>\n\n\n\n<p>The advantages are:-<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It is used for managing and manipulating of data.<\/li><li>No license restrictions<\/li><li>Free and open source software.<\/li><li>Graphical capabilities of R are good.<\/li><li>Runs on many Operating system and different hardware and also run on 32 &amp; 64 bit processors etc.<\/li><\/ul>\n\n\n\n<p><strong>33. How you can produce co-relations and covariances?<\/strong><\/p>\n\n\n\n<p>Cor-relations is produced by cor() and covariances is produced by cov() function.<\/p>\n\n\n\n<p><strong>34.<\/strong> <strong>What is difference between matrix and dataframes?<\/strong><\/p>\n\n\n\n<p>Dataframe can contain different type of data but matrix can contain only similar type of data. Here are the different types of data structures in R:<\/p>\n\n\n\n<p><strong>35.<\/strong> <strong>What is difference between lapply and sapply?<\/strong><\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p><strong>36<\/strong>. <strong>What is the difference between seq(4) and seq_along(4)?<\/strong><\/p>\n\n\n\n<p>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)).<\/p>\n\n\n\n<p><strong>37. Explain how you can start the R commander GUI?<\/strong><\/p>\n\n\n\n<p>rcmdr command is used to start the R commander GUI.<\/p>\n\n\n\n<p><strong>38. What is the memory limit of R?<\/strong><\/p>\n\n\n\n<p>In 32 bit system memory limit is 3Gb but most versions limited to 2Gb and in 64 bit system memory limit is 8Tb.<\/p>\n\n\n\n<p><strong>39. How many data structures R has?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"765\" height=\"406\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Structures.png\" alt=\"\" class=\"wp-image-27135\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Structures.png 765w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/02\/Structures-300x159.png 300w\" sizes=\"auto, (max-width: 765px) 100vw, 765px\" \/><figcaption>Data structures in R<\/figcaption><\/figure>\n\n\n\n<p>There are 5 data structures in R i.e. vector, matrix, array which are of a homogenous type and the other two are list and data frame which are heterogeneous.<\/p>\n\n\n\n<p><strong>40.<\/strong> <strong>How many sorting algorithms are available?<\/strong><\/p>\n\n\n\n<p>There are 5 types of sorting algorithms are used which are:-<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Bubble Sort<\/li><li>Selection Sort<\/li><li>Merge Sort<\/li><li>Quick Sort<\/li><li>Bucket Sort<\/li><\/ul>\n\n\n\n<p><strong>41. How to create new variable in R programming?<\/strong><\/p>\n\n\n\n<p>____________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">For<\/span> creating <span class=\"hljs-keyword\">new<\/span> variable assignment operator \u2018&lt;-\u2019 is used\r\n<span class=\"hljs-keyword\">For<\/span> e.g. mydata$sum &lt;- mydata$x1 + mydata$x2\n____________________________\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>42.<\/strong> <strong>What are R packages?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static.javatpoint.com\/tutorial\/r\/images\/r-packages.png\" alt=\"R Packages - javatpoint\" \/><figcaption>What are R packages<\/figcaption><\/figure>\n\n\n\n<p>Packages are the collections of data, R functions and compiled code in a well-defined format and these packages are stored in library. One of the strengths of R is the user-written function in R language.<\/p>\n\n\n\n<p><strong>43<\/strong>. <strong>What is the workspace in R?<\/strong><\/p>\n\n\n\n<p>Workspace is the current R working environment which includes any user defined objects like vector, lists etc.<\/p>\n\n\n\n<p><strong>44.<\/strong> <strong>What is the function which is used for merging of data frames horizontally in R?<\/strong><\/p>\n\n\n\n<p>Merge()function is used to merge two data framesa<\/p>\n\n\n\n<p>________________________________________________<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">Eg. Sum<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">-merge(data<\/span> <span class=\"hljs-attr\">frame1<\/span>,<span class=\"hljs-attr\">data<\/span> <span class=\"hljs-attr\">frame<\/span> <span class=\"hljs-attr\">2<\/span>,<span class=\"hljs-attr\">by<\/span>=<span class=\"hljs-string\">\u2019ID\u2019)<\/span>\n<span class=\"hljs-attr\">______________________________________<\/span>\n<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>45.<\/strong> <strong>what is the function which is used for merging of data frames vertically in R?<\/strong><\/p>\n\n\n\n<p>rbind() function is used to merge two data frames vertically.<\/p>\n\n\n\n<p>____________________________________<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">Eg. Sum &lt;- rbind(data frame1,data frame 2)\n____________________________\n<\/code><\/span><\/pre>\n\n\n<p><strong>46<\/strong>. <strong>Which method is used for exporting the data in R?<\/strong><\/p>\n\n\n\n<p>There are many ways to export the data into another formats like SPSS, SAS , Stata , Excel Spreadsheet.<\/p>\n\n\n\n<p><strong>47. <strong>What is the use of tapply?<\/strong><\/strong><\/p>\n\n\n\n<p>IOS-6.1.3<\/p>\n\n\n\n<p><strong>48.<\/strong> <strong>Explain app specific objects which store the app contents?<\/strong><\/p>\n\n\n\n<p>The app specific objects are Data model objects that store app\u2019s contents.<\/p>\n\n\n\n<p><strong>49.<\/strong> <strong>What is GGobi?<\/strong><\/p>\n\n\n\n<p>GGobi is an open-source program for data visualization for exploring high dimensional typed data.<\/p>\n\n\n\n<p><strong>50.<\/strong> <strong>How to create scatterplot matrices?<\/strong><\/p>\n\n\n\n<p>Pair() or splom() function is used for create scatterplot matrices.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\"  id=\"_ytid_85234\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/SBhpLnPuNlI?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  epyt-is-override  no-lazyload\" title=\"YouTube player\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>What is R Language? R is data analysis software which is used by analysts, quants, statisticians, data scientists and others. 2. Explain how you can start the R commander GUI? Typing the command, (\u201cRcmdr\u201d) into the R console starts the R commander GUI. 3. In R how you can import Data? You use R commander&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[641,1869,766,3902,482,7315,7225],"class_list":["post-27120","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-answers","tag-faq","tag-interview","tag-programming","tag-questions","tag-r-language","tag-top-50"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/27120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=27120"}],"version-history":[{"count":5,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/27120\/revisions"}],"predecessor-version":[{"id":27136,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/27120\/revisions\/27136"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=27120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=27120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=27120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}