R/scRNAtools_tsne.R

Defines functions scRNAtools_tsne

Documented in scRNAtools_tsne

scRNAtools_tsne <-
function(exam){
Rtsne::Rtsne
iris_unique <- unique(exam) # Remove duplicates
iris_matrix <- as.matrix(iris_unique[,1:(ncol(exam)-1)])
set.seed(42) # Set a seed if you want reproducible results
tsne_out <- Rtsne(iris_matrix) 
pdf(file=file.path(tempdir(), "t-SNE.pdf"))
plot(tsne_out$Y,col=iris_unique$Cell)
title ("t-SNE analysis")
dev.off()
}

Try the scRNAtools package in your browser

Any scripts or data that you put into this service are public.

scRNAtools documentation built on May 2, 2019, 2:43 a.m.