Description Usage Arguments Value Examples
View source: R/pca_data_tidy.R
the Principal Components Analysis need the data must be transformed
1 | pca_data_tidy(data, id = NULL)
|
data |
the input data must be a dataframe or tibble which' rownames is gene id and colnames is sample name |
id |
the rowid, can be a character or the column number |
a dataframe
1 2 3 4 5 6 7 8 9 | test = matrix(rnorm(200), 20, 10)
test[1:10, seq(1, 10, 2)] = test[1:10, seq(1, 10, 2)] + 3
test[11:20, seq(2, 10, 2)] = test[11:20, seq(2, 10, 2)] + 2
test[15:20, seq(2, 10, 2)] = test[15:20, seq(2, 10, 2)] + 4
colnames(test) = paste("Test", 1:10, sep = "")
rownames(test) = paste("Gene", 1:20, sep = "")
annot <- c(rep("KEGG",20))
test <- data.frame(test,annot)
pca_data_tidy(as.data.frame(test)) -> test
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.