Sorry,
How I can make my datasets numeric?
mim <- build.mim(mycounts,estimator="spearman") Error in cor(dataset, method = estimator, use = "complete.obs") : 'x' must be numeric
I did like below
# read as matrix as.matrix(mycounts) # viewing mycounts class class(mycounts) # setting as numeric sapply(mycounts, class)
head(mycounts)
output please. Try
mim <- build.mim(as.numeric(mycounts),estimator="spearman")
mim <- build.mim(data.matrix(mycounts),estimator="spearman")
Do you have row/column names in mycounts? If so, change these to headers and row.names.
row.names
Otherwise, try:
as.numeric(mycounts)
instead of just mycounts as suggested above.
mycounts
thank you,
I tried,
mycounts <- as.matrix(read.table("file.txt", sep="\t", header=TRUE))
then
res_aracne <- build.mim(mycounts,estimator = "spearman")
also
and
mim <- build.mim(data.matrix(mycounts),estimator="spearman") as.numeric(mycounts)
but all the same error
Can you provide the output of:
So we can see what R is seeing?
thank u
These values include alphanumeric characters. This function only accepts numbers. You can only input a dataset of numeric values.
these are rows name
exactly. so what's the result of
dim(my counts)
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
thank you,
I tried,
then
also
and
but all the same error
Can you provide the output of:
So we can see what R is seeing?
thank u
These values include alphanumeric characters. This function only accepts numbers. You can only input a dataset of numeric values.
these are rows name
exactly. so what's the result of