library(Rtsne)
setwd("n/g")
expression_data <- read.table(file = "zdata.matrix.xlsx", row.names = 1, sep=',', header = T)
meta_data <- read.table(file = "atac_v1_pbmc_10k_singlecell.xlsx", row.names = 1, sep=',', header = T)
tsne_realData <- Rtsne(expression_data, perplexity=10, check_duplicates = FALSE)
# Error in terms.formula(object, data = data) :
# '.' in formula and no 'data' argument发布于 2020-04-07 20:31:16
我简要介绍了Rtsne package documentation,Rtsne()函数要求数据格式为矩阵。在将expression_data传递给Rtsne函数之前,尝试将其转换为矩阵。您可以这样做:
library(Rtsne)
setwd("n/g")
expression_data <- read.table(file = "zdata.matrix.xlsx", row.names = 1, sep=',', header = T)
meta_data <- read.table(file = "atac_v1_pbmc_10k_singlecell.xlsx", row.names = 1, sep=',', header = T)
expression_matrix <- as.matrix(expression_data)
tsne_realData <- Rtsne(expression_matrix, perplexity=10, check_duplicates = FALSE)https://stackoverflow.com/questions/61058056
复制相似问题