[R] Creating list with increasing string lengths

2015-06-13 Thread Nia Gupta via R-help
Hello, I am trying to create a list where each name would have an increasing vector length. For example, I am trying to obtain something that looks like this: [[1]][1] 2 [[2]] [1] 2 4 [[3]] [1] 1 2 3 . The numbers generated would just be any random numbers. My thought was to use a fo

[R] sort by decreasing columns?

2014-12-13 Thread Nia Gupta via R-help
Hello, I have a data frame that looks like this:    a  b    c 1    2   3    8 2    3   5    9 I was wondering if it was possible to reorder the columns by decreasing values so the new data frame would look like this:    c b    a 1    8 3    2 2