One thing that can be confusing about R's "everything is a vector" approach is that row-wise and column-wise operations may not adhere to your intuition.
关于R的 “所有东西都是向量”方式,容易引起混乱的一点是行操作和列操作可能不符合直觉。
But if you wanted to create a vector to sum each row, you might be inclined to try the following.
但是,如果希望创建一个向量来求每行的总和,您可能会编写下面这样的代码。
But if you wanted to create a vector to sum each row, you might be inclined to try the following.
但是,如果希望创建一个向量来求每行的总和,您可能会编写下面这样的代码。
应用推荐