[R] Any help on R code interpretation?
ruipbarradas at sapo.pt
Thu Dec 22 14:27:39 CET 2016
t() is the transpose function, it computes the transpose of matrix
site=='BC', site =='MM', site =='XY',Temp,Treatment=='Local'))
then %*% is matrix multiplication. If you have doubts on the result,
compute as.matrix(mod7)%*%t(...) outside the call to plogis.
And no, the two codes do not give the same results. Read the help page
?plogis to find out the arguments to that function.
Hope this helps,
Em 22-12-2016 13:08, Marna Wagley escreveu:
> 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.
> 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 ==
> prediction =plogis(as.matrix(mod7),(ab))
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help