How do I make a matrix from a list of vectors in R?

0 votes
How do I make a matrix from a list of vectors in R?
Aug 6 in Data Analytics by anonymous
21 views

1 answer to this question.

0 votes

Suppose l1 and l2 are my vectors,

li = c(1:5)

l2 = c(5:10)

Create a amtric from vectors using below syntax.

mat = matrix(c(vector1,vector2),nrow = m,ncol = n) where m and n are number of rows and columns.

answered Aug 6 by Cherukuri
• 27,880 points

Related Questions In Data Analytics

0 votes
0 answers

How do I remove an element from a list by index in R?

How do I remove an element from ...READ MORE

16 hours ago in Data Analytics by ch
• 1,970 points
2 views
+1 vote
1 answer

How to convert a list of dataframes in to a single dataframe using R?

You can use the plyr function: data <- ...READ MORE

answered Apr 13, 2018 in Data Analytics by darklord
• 6,170 points
169 views
0 votes
1 answer

How can I delete multiple values from a vector in R?

The %in% operator tells  which elements are ...READ MORE

answered Apr 26, 2018 in Data Analytics by shams
• 3,580 points
210 views
0 votes
1 answer

How do I get different distributions of our dataset in R?

There are multiple ways of getting this. ...READ MORE

answered Nov 26, 2018 in Data Analytics by Maverick
• 10,040 points
63 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
105 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
131 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points
78 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
83 views
0 votes
4 answers

How to remove NA values from a Vector in R?

You can try na.omit() or na.exclude() too. ...READ MORE

answered Jul 31 in Data Analytics by anonymous
• 27,880 points
7,124 views
0 votes
2 answers