| df_utls | R Documentation | 
The utility for handling data.frame
td(dat, nm, rn, fctr_dat) subd(dat, idlist, idx, mrgn) subd(dat, idlist, idx, mrgn)
| dat | data.frame: | 
| nm | character: [default: NULL] | 
| rn | logical: [default: FALSE] | 
| fctr_dat | data.frame or vector | 
| idlist | list: a list for extracting subset | 
| idx | atomic: a column of index for splitting the data.frame | 
| mrgn | integer: margin of data.frame | 
## Not run: 
# Create a transposed data.frame with names
td(iris[-5], nm = rownames(iris), rn = T)
td(iris[-5], nm = paste0(substr(iris$Species,1,3), rownames(iris)), rn = T)[1:3,1:3]
td(iris[-5], nm = paste0(substr(iris$Species,1,3), rownames(iris)), rn = F)[1:3,1:3]
# Create a transposed data.frame with names and columns of factor
vdat <- rsko::splt_dat(names(iris[-5]), "\\.", c("organ","where"))
td(iris[-5], nm = rownames(iris), )
dat <- rskodat::fpkm
fctr_dat <- rsko::splt_dat(names(dat), "_", c("cnd","time","rep"))
tdat <- td(dat, rownames(dat), fctr_dat); tdat[1:6]
# Subset with a list for index column
sub_idx1 <- list(toyota = c("Toyota Corolla", "Toyota Corona"),
    mazda = c("Mazda RX4", "Mazda RX4 Wag"))
subd(mtcars, sub_idx1, rownames(mtcars), 1)
sub_idx2 <- list(c("mpg", "disp"), c("vs","gear"))
subd(mtcars, sub_idx2, names(mtcars), 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.