|
楼主: longguojun114
|
2059
4
求助 |
|
小学生 85%
-
|
回帖推荐mfr1988926 发表于2楼 查看完整内容 我也是初学者,函数写的可能很逊,但应该能解决你的问题了
matrixmax=function(x){
n=nrow(x);m=ncol(x)
x=t(x)
x=as.vector(x)
maxx=max(x)
whichmax=which(x==max(x))
wm=length(whichmax)
n1=whichmax/m;m1=whichmax%%m
for(k in 1:wm){
if(!is.integer(n1)) n1=ceiling(n1)
if(is.integer(n1)) n1=n1
}
for(i in 1:wm){
if(m1==0)m1=m
if(m1!=0) m1=m1
}
list(最大值= ...
本帖被以下文库推荐
| ||
|
|
| ||||||||||||
| ||
| ||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


