Different data structures in R

0 votes
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,690 points
86 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 darklord
• 6,190 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 by anonymous
• 32,260 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,060 points

edited Apr 12, 2018 by nirvana 3,955 views
0 votes
1 answer

.SD in data.table in R

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

answered Apr 12, 2018 in Data Analytics by nirvana
• 3,060 points
1,853 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,710 points
114 views
0 votes
1 answer

Big Data transformations with R

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

answered Dec 17, 2017 in Data Analytics by Sudhir
• 1,610 points
66 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,560 points
84 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,560 points
225 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

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

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,560 points
133 views
0 votes
2 answers

How to sort a data frame by columns in R?

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

answered Aug 21 in Data Analytics by anonymous
• 32,260 points
163 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 darklord
• 6,190 points
62 views