transpose_counts: transpose_counts

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

[TEXT]

Usage

1
transpose_counts <- function(otu.counts)

Arguments

counts

[TEXT]

functional.map

[TEXT]

Details

[TEXT]

Value

[TEXT]

Note

no further notes

Author(s)

dlemas

References

no references

See Also

no additional links

Examples

 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)}

dlemas/microbes documentation built on May 15, 2019, 9:15 a.m.