我有一个下一个 struct 数据帧qw[[I]],I=19(嵌套列表).例如:
dput(qw[[19]])
list(c(87.6755555555556, 36, 117.277222222222, 64.7858333333333
), c(46.44, 19.4966666666667, 207.101666666667, 92.5783333333333)
...
我不知道如何使用lappy(X,FUN=norm)来计算每个块的norm:
list(c(87.6755555555556, 36, 117.277222222222, 64.7858333333333)
qnw <- lapply(matrix(unlist(qw)), FUN = norm)
在我遇到同样的错误后:
Error in FUN(X[[i]], ...) : 'A' must be a numeric matrix
如何修复它?