Description Usage Arguments Details Value Note Author(s) References See Also Examples
[TEXT]
1  | transpose_counts <- function(otu.counts)
 | 
counts | 
 [TEXT]  | 
functional.map | 
 [TEXT]  | 
[TEXT]
[TEXT]
no further notes
dlemas
no references
no additional links
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  | ##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
## The function is currently defined as
transpose_counts <- function(otu.counts) {
  
  ## flips otu.normed
  otu.counts.t = setNames(data.frame(t(otu.counts[,])), row.names(otu.counts))
  ## make the study_id a column
  otu.counts.t$library_id <-row.names(otu.counts.t)
  ## move study_id to row.names
  row.names(otu.counts.t) <- otu.counts.t$library_id
  otu.counts.new <- otu.counts.t[,-1]
  last.col.no=dim(otu.counts.new)[2]
  second.last.col.no=last.col.no-1
  A=otu.counts.new[c(last.col.no,1:second.last.col.no)]
  
return(A)}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.