Description Usage Arguments Value Author(s)
column2rownames, col2rownames
: Move a column of x
to the rownames
and remove it from x
row2colnames
: Move a row of x to the colnames and remove it from x
rownames2col,rownames2column
: Move the rownames of x into a column
colnames2row
: Move the colnames of x into a row.
1 2 3 4 5 6 7 8 9 10 11 | column2rownames(x, column = 1, sep = ".")
col2rownames(x, column = 1, sep = ".")
row2colnames(x, row = 1, sep = ".")
rownames2col(x, column = 1, colname = "")
rownames2column(x, column = 1, colname = "")
colnames2row(x, row = 1, rowname)
|
x |
a |
column |
the column index that the newly moved rownames will have - (ie
|
sep |
the value to use to make the rownames unique (if necessary) |
row |
the row index that the newly moved colnames will have - (ie row=1 puts the colnames into the first row). If row=NULL or row > nrow(x), the colnames will be moved to the first, and last row, respectively. |
colname |
what name should the new column have? only gets set if there was a colname to begin with. |
rowname |
what name should the new row have? only gets set if there was a rowname to begin with. |
column2rownames, col2rownames
: x
with 1 less column and with rownames
set
row2colnames
: x
with 1 less row and with colnames
set
rownames2col,rownames2column
: a data.frame
with ncol(x) + 1
and the rownames in the extra column.
The colclasses will be the same as they were in x
, and the rownames will
have the class of “character”.
colnames2row
: a data.frame
with nrow(x) + 1
and the colnames in the extra row.
The rowclasses will be the same as they were in x
, and the colnames will
have the class of “character”.
Mark Cowley, 31 May 2006
Mark Cowley, 31 May 2006
Mark Cowley, 31 May 2006
Mark Cowley, 31 May 2006
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.