Transpose Function in R is not transposing

前端 未结 1 1308
谎友^
谎友^ 2021-01-20 05:34

Trying to transpose a vector in R and then name it.

I created a vector, v as follows:

v<-c(1,2,3,4)

But when I try

相关标签:
1条回答
  • 2021-01-20 06:24
    #Create data
    v<-c(1,2,3,4)
    
    #In addition to the answers presented prior to mine, you could do this. 
    t(t(v))
        [,1]
    [1,]    1
    [2,]    2
    [3,]    3
    [4,]    4
    
    0 讨论(0)
提交回复
热议问题