gpt4 book ai didi

r - R %*% 运算符

转载 作者:行者123 更新时间:2023-12-03 13:29:59 25 4
gpt4 key购买 nike

这是什么?我无法通过使用 ? 获得帮助. (抱歉我笨)

> 1%*%1
[,1]
[1,] 1
> 10%*%10
[,1]
[1,] 100
> c(1:2)%*%c(1:2)
[,1]
[1,] 5

最佳答案

这是一个矩阵乘法运算符!
来自 the documentation :

Description:

Multiplies two matrices, if they are conformable. If one argument is a vector, it will be promoted to either a row or column matrix to make the two arguments conformable. If both are vectors of the same length, it will return the inner product (as a matrix).

Usage:

x %*% y

Arguments:

x, y    numeric or complex matrices or vectors

关于r - R %*% 运算符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22060515/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com