我用相同的种子重新运行,但不能在 R studio 中产生相同的结果。
调用不同的用户包、R6 类和方法时,set.seed() 会丢失轨道吗?
您是否遇到过类似的情况以及如何解决?
非常感谢
closeAllConnections()
rm(list=ls())
gc()
set.seed(123456)
require(PackageA) #user defined package
fileName <- "N:/Risk Management/abc.json";
configuration <- JsonConfigurationReader$readConfiguration(fileName); #R6 class and method in PackageA
instance <- someClass$new(configuration); #R6 class and method in PackageA
instance$execute() #will produce some random numbers in this method
closeAllConnections()
rm(list=ls())
gc()