<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/data-structures-exercises-part-1/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://r-exercises.com/2017/04/07/r-data-structures-exercises-part-1/?utm_source=rss&utm_medium=rss&utm_campaign=r-data-structures-exercises-part-1"> R-exercises</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>R Programming has various Data Structures for efficient manipulation of Data.<br>
Following are the list of data structures supported by R.<br>
<a target="_blank" rel="nofollow" href="http://r-exercises.com/wp-content/uploads/2017/04/Data_image.png?x61433"><img sizes="(max-width: 281px) 100vw, 281px" alt="" class="wp-image-4876" src="https://i0.wp.com/r-exercises.com/wp-content/uploads/2017/04/Data_image-281x300.png?resize=281%2C300" data-recalc-dims="1"></a><br>
1.	Vectors<br>
2.	Lists<br>
3.	Matrix<br>
4.	Data frame<br>
This exercise helps through various operations of R Data structures.</p>
<p>Answers to the exercises are available <a target="_blank" rel="nofollow" href="http://r-exercises.com/2017/04/07/data-structures-solutions-1/">here</a>.</p>
<p><strong>Exercise 1</strong></p>
<p>Create an atomic vector of Character type, double type, logical type , integer type, complex type and raw type</p>
<p><strong>Exercise 2</strong></p>
<p>Check whether each of the created data structure is of vector type as well as check the class of each of the data.</p>
<p><strong>Exercise 3</strong></p>
<p>Create a List of heterogeneous data, which include numeric, character and logical vectors and prints the lists.</p>
<p><strong>Exercise 4</strong></p>
<p>Create a matrix of 3 rows and 4 columns which stores data from 1 to 12 and arrange the value row wise.</p>
<p><strong>Exercise 5</strong></p>
<p>Create a matrix of 3 rows and 4 columns which stores random data and arrange the matrix column wise</p>
<p><strong>Exercise 6</strong></p>
<p>Create two 2 x 2 matrices with random values and perform all arithmetic operations with those two and print the resultant matrices</p>
<p><strong>Exercise 7</strong></p>
<p>Create a random matrix having values between 1 and 1000 and print the matrix and transpose of the matrix</p>
<p><strong>Exercise 8</strong></p>
<p>Create Data Frames which contain details of 5 employees and display the same.</p>
<p><strong>Exercise 9</strong></p>
<p>Create Data Frames which contain details of 5 employees and display summary of the data</p>
<p><strong>Exercise 10</strong></p>
<p>Create a Data Frame of 5 employees and display the details of First and Last Employee and Names of All employees.</p>
<div>
<h3>Related exercise sets:</h3>
<ol>
<li><a title="Matrix exercises" target="_blank" rel="nofollow" href="http://r-exercises.com/2015/11/28/matrix-exercises/">Matrix exercises </a></li>
<li><a title="3D plotting exercises" target="_blank" rel="nofollow" href="http://r-exercises.com/2016/04/06/3d-plotting-exercises/">3D plotting exercises </a></li>
<li><a title="Basic Operations Exercises" target="_blank" rel="nofollow" href="http://r-exercises.com/2016/10/23/basic-operations/">Basic Operations Exercises </a></li>
<li><a target="_blank" rel="nofollow" href="http://r-exercises.com/start-here-to-learn-r/">Explore all our (>1000) R exercises</a></li>
<li><a target="_blank" rel="nofollow" href="http://r-exercises.com/r-courses/">Find an R course using our R Course Finder</a> directory</li>
</ol>
</div>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://r-exercises.com/2017/04/07/r-data-structures-exercises-part-1/?utm_source=rss&utm_medium=rss&utm_campaign=r-data-structures-exercises-part-1"> R-exercises</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/9JC4bitB4MY"></a></div>