[R] Any help on R code interpretation?
Thierry Onkelinx
thierry.onkelinx at inbo.be
Thu Dec 22 14:23:21 CET 2016
Dear Marna,
It's a combinations of two functions: %*% and t()
help("%*%") and help("t") will open their helpfiles.
Best regards,
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
2016-12-22 14:08 GMT+01:00 Marna Wagley <marna.wagley op gmail.com>:
> 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]]
>
> ______________________________________________
> R-help op r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list