执行前面的 R 编程代码后,将会创建一个在表 4 中显示 tcrossprod 结果的矩阵。 tcrossprod 函数也是 t 函数和 %*% 运算符表达式的更快替代方法。所以,我们也可以使用这种替代代码: my_tcrossprod2 <- my_mat %*% t(my_mat) # %*% operator & t() function my_tcrossprod2 # Print cross product of...
> traceback() 4: base::tcrossprod(x, y) 3: tcrossprod(model_pars_final[genes_bin, -1, drop = FALSE], regressor_data_final) 2: tcrossprod(model_pars_final[genes_bin, -1, drop = FALSE], regressor_data_final) 1: sctransform::vst(so@assays$RNA@counts, cell_attr = so@meta.data...
输出: [,1][,2][1,]13[2,]24[,1][,2][1,]1014[2,]1420 示例2: #R program to illustrate#tcrossprodfunction#Initializing a matrix with#3rowsand3columns x<-matrix(1:9,3,3)#Getting the matrix representationx#Calling thetcrossprod()functiontcrossprod(x) ...
crossprod <- function(x, y=NULL) .Internal(crossprod(x,y)) tcrossprod <- function(x, y=NULL) .Internal(tcrossprod(x,y)) ## R >= 4.4.0: are primitive ## crossprod <- function(x, y=NULL) .Internal( crossprod(x,y)) ## tcrossprod <- function(x, y=NULL) .Internal(tcrossprod...
1. > help("solveCrossprod")solveCrossprod package:strucchange R Documentation Inversion of X'X Description: Computes the inverse of the cross-product of a matrix X. Usage: solveCrossprod(X, method = c("qr", "chol", "solve")) Arguments: X: a matrix, typically a regressor matrix. method...