currently, we have developed a model at work and it is at the verification step. the goal is for another person to receive output from each and every step of calculation to verify. The issue is that the model is quite complex and large due to Montecarlo simulation and also being assembled from various scripts (ca. 20 scripts with further for/if test within). it also has too many intermediate and temporary variables (like temporary row index or col index) to use write.csv() after every line.
Hence, I wonder if anybody faces the same issue before or having a systematic package or method to implement these features? Many thanks. for example:

f <- function(x) { #toy function doing rowSums
output <- rowSums(x); return(output) }

# generate a temporary matrix
randomMatrix  <- matrix(rnorm(1e6*10),ncol = 10, nrow = 1e6) #this need to be saved/stored/printed
y             <- 1*2 + 3 #this need to be saved/stored/printed  
t             <- f(x)    #this need to be saved/stored/printed

finalvariable <- t^y     #this need to be saved/stored/printed 

# many thanks 


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.