NO
my code is something like:
reading data from database ,and do some search and calculation.
No random value involved. and the right value in the "sum_month" is nearly 1 million. and the wrong value is around 10.
here is a brief look of my code.
sum_month=matrix(NA,ncol=14,nrow=32)
sum_month[,1]=my_product
colnames(sum_month)=c("product","type","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
sum_month[,2]=c(rep("realized",length(my_product)),rep("projection",length(my_product)))
for(i in my_product){
tmp_input=read.csv(paste0(my_db_path,i,"_input.csv"),stringsAsFactors = F)
for (j in 4:15){
tmp_input[,j]=as.numeric(tmp_input[,j])
}
tmp_result=generate_table(i,tmp_input)
sum_month[sum_month[,1]==i&sum_month[,2]=="realized",3:14]=tmp_result$bulk_out["aaa",]
sum_month[sum_month[,1]==i&sum_month[,2]=="projection",3:14]=tmp_result$bulk_out["bbb",]
}