[R] Any help on R code interpretation?
btupper at bigelow.org
Thu Dec 22 14:29:01 CET 2016
It's a bit hard to read what you have provided (don't forget that code pasted into emails on this list are best rendered if the email client is configured for plain text not html), but I suspect that it there is no %*%t. Instead, I think it should look like...
x %*% t(y)
where your x is 'mod7' and your y is all that other stuff. You might try ...
prediction = plogis( as.matrix( mod7 %*% t(ab) ) )
but that's just a guess.
> On Dec 22, 2016, at 8:08 AM, Marna Wagley <marna.wagley at gmail.com> wrote:
> 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.
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
More information about the R-help