package - Matrix multiplication in the examples section of R documentation -
i producing .rd file document function in bundle have written. in examples field include matrix multiplications using %*% command `build & check' procedure appears see % comment , check fails. there way around this, other using crossprod() function? - little tedious since numerous multiplications.
stripping out of content of file, looks this
\name{travel data} \alias{travel}\alias{trav.qly}\alias{trav.mly} \doctype{data} \title{ visits abroad uk residents } \description{} \details{} \examples{ v<-rbind(cbind(b%*%k[1:84,1:84]%*%t(b),b%*%k[1:84,85:120]),cbind(k[85:120,1:84]%*%t(b),k[85:120,85:120])) c<-cbind(k[1:84,1:84]%*%t(b),k[1:84,85:120]) } \keyword{datasets}
then bundle checker gives me output looks this
* checking examples ... error running examples in ‘regspec-ex.r’ failed error occurred in: ... > v<-rbind(cbind(b + c<-cbind(k[1:84,1:84] error: unexpected symbol in: " c" execution halted exited status 1.
thanks comments , suggestions. appears problem has been addressed here r message board. key utilize \
marks before %
demonstrated in .rd file matmult
.
r package matrix-multiplication
No comments:
Post a Comment