我是R.的新手.我想用我的for循环结果填充一个空矩阵cbind.我的问题是,如何消除矩阵第一列中的NA.我在下面包含我的代码:
output<-matrix(,15,) ##generate an empty matrix with 15 rows, the first column already filled with NAs, is there any way to leave the first column empty?
for(`enter code here`){
normF<-`enter code here`
output<-cbind(output,normF)
}
Run Code Online (Sandbox Code Playgroud)
输出是我预期的矩阵.唯一的问题是它的第一列充满了NA.如何删除这些NA?