model.matrix in metagenomeSeq
1
0
Entering edit mode
PJ • 0
@pj-8012
Last seen 7.8 years ago
United States

Hi,

I am running fitZig for differential abundance testing. When I place:

treatment=pData(obj)$Treatment

Before=pData(obj)$Time

normFactor=normFactors(obj)

normFactor=log2(normFactor/median(normFactor)+1)

mod = model.matrix (Treatment + Before + normFactor), the answer is:

Error: $ operator is invalid for atomic vectors

Based on internet there is  an error when applying $ to a vector. But how can I fix the problem in the script? 

Thanks!!

PJ

 

fitZig • 1.7k views
ADD COMMENT
0
Entering edit mode
@hector-corrada-bravo-6203
Last seen 5.4 years ago
United States

Missing '~' in the formula specification?

mod = model.matrix(~Treatment+Before+normFactor)
ADD COMMENT

Login before adding your answer.

Traffic: 771 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