[R] Any help on R code interpretation?

Marna Wagley marna.wagley at gmail.com
Thu Dec 22 14:08:11 CET 2016


HI R user,
I was looking a r code and saw "%*%t", what does it("%*%t") mean?. The
example is given below.

For example: here is the code where "%*%t" has been used. when I run the
formula but did not run in my data.

prediction=plogis(as.matrix(mod7)%*%t(with(subset(data,site!='AB'),cbind(1,
site=='BC', site =='MM', site =='XY',Temp,Treatment=='Local'))))

Can I get the same result of above using the following code? Do both codes
give same results?

ab<-with(subset(data,site!='AB'),cbind(1,site=='BC', site =='MM', site ==
'XY',Temp,Treatment=='Local'))
prediction =plogis(as.matrix(mod7),(ab))

Thanks,

MW

	[[alternative HTML version deleted]]



More information about the R-help mailing list