Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是上一篇文章的后续问题。
我需要为一个需要一个矩阵和一个值initialize()的 S4 类(名为 )编写一个方法。它应该被定义为一个带有正式参数的函数,并且应该将下三角元素放入对象中。Bandk(x, k)X
initialize()
Band
k
(x, k)
X
任何建议表示赞赏。
Matrix 包有许多与矩阵相关的 S4 类和方法的示例:
http://cran.r-project.org/web/packages/Matrix/
下载源代码并查看。