Assume a data frame constructed as
df = data.frame(replicate(2,sample(0:10,2,rep=TRUE)))
df = t(df)
df
which returns something like
[,1] [,2]
X1 9 8
X2 10 4
Here's the question: how to change the order of the lines so that:
[,1] [,2]
X2 10 4
X1 9 8
? Thanks!
source
share