Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to fill the element of matrix row wise in R?

$
0
0

@sid100158 wrote:

I have created a matrix of numbers from 1 to 9 but in matrix numbers are arranged column wise.I want to fill the numbers row wise.

matrix(1:9, nrow = 3)

     [,1] [,2] [,3]
[1,]    1    4    7
[2,]    2    5    8
[3,]    3    6    9

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles