Different data structures in R

+1 vote
Hey! I am new to R and I want to know the different data structures in R!!

Can someone please help?
Jul 24, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
1,182 views

2 answers to this question.

0 votes

Broadly speaking these are Data Structures available in R:

  • Vector
    • vector is a sequence of data elements of the same basic type. Members in a vector are called components.
  • List
    • Lists are the R objects which contain elements of different types like − numbers, strings, vectors or another list inside it.
  • Matrix
    • 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).
  • Dataframe
    • data frame is more generic than a matrix, i.e different columns can have different data types(numeric, character, logical, etc).
    • data frame combines features of matrices and lists. In fact we can consider a data frame as a rectangular list.
answered Jul 24, 2018 by Sahiti
• 6,370 points
0 votes
The different data types in R are as below.

List

Vector

Matrix - 2D representation of data.

Array - A multidimensional matrix or many matrices.

Tibble - table representation of data.

Dataframe - table representation of data.
answered Aug 26, 2019 by anonymous
• 33,030 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
1 answer

How to convert a list to data frame in R?

Let's assume your list of lists is ...READ MORE

answered Apr 12, 2018 in Data Analytics by nirvana
• 3,130 points

edited Apr 12, 2018 by nirvana 21,846 views
0 votes
1 answer

.SD in data.table in R

.SD stands for "Subset of Data.table". The ...READ MORE

answered Apr 13, 2018 in Data Analytics by nirvana
• 3,130 points
6,666 views
0 votes
1 answer

How to convert tables to a data frame in R ?

> trial.table.df <- as.data.frame(trial.table) //assuming that trial.table ...READ MORE

answered Apr 20, 2018 in Data Analytics by zombie
• 3,790 points
7,220 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,610 points
768 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
844 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
5,549 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,660 points
859 views
+1 vote
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
1,449 views
0 votes
1 answer

How to calculate group mean and assign it to new data in R

You can use something like this: df$grp.mean.values <- ...READ MORE

answered Jun 27, 2018 in Data Analytics by Sahiti
• 6,370 points
1,555 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP