what does this error mean please?
1
0
Entering edit mode
8.3 years ago
zizigolu ★ 4.3k

Hi,

I have a matrix,

head(MATRS[1:2,1:2])
     GENES_COL         COUNTS_COL
[1,] " oId CUFF.103.1" "1"       
[2,] " oId CUFF.119.1" "1"       

MATRS <- cbind(GENES_COL, COUNTS_COL)
#Create matrix that contains an ORF for each row and for each column that contains the count of reads that are in a window of n nucleotides
n=binwidth
MATRS_new_1 <- matrix(nrow=length(GENES_COL), ncol=(as.integer(max(geneslength)/n)+1))
#

Error in Summary.factor(c(1368L, 115L, 53L, 1135L, 1317L, 776L, 593L,  : 
  'max' not meaningful for factors

How I can fix this error please?

R • 1.2k views
ADD COMMENT
1
Entering edit mode
8.3 years ago

The error message means you're applying max() to something that, although it may look numeric, is a factor. To fix, convert to numeric.

ADD COMMENT

Login before adding your answer.

Traffic: 2417 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6