search for: tmp_fun

Displaying 5 results from an estimated 5 matches for "tmp_fun".

2016 Jul 27
3
Model object, when generated in a function, saves entire environment when saved
...l exists in .GlobalEnv, everything is peachy. So replicating whatever happens when saving the model that was generated in .GlobalEnv at the return() stage of the function call would fix this problem. I was referred to this list from r-bugs. First time r-devel poster. Hope this helps, Kendon ``` tmp_fun <- function(x){ iris_big <- lapply(1:10000, function(x) iris) lm(Sepal.Length ~ Sepal.Width, data = iris) } out <- tmp_fun(1) object.size(out) # 48008 save(out, file = "tmp.RData", compress = FALSE) file.size("tmp.RData") # 57196752 - way too big # Works fine when...
2016 Jul 27
2
Model object, when generated in a function, saves entire environment when saved
...odel that was >> generated in .GlobalEnv at the return() stage of the function call >> would fix this problem. >> >> I was referred to this list from r-bugs. First time r-devel poster. >> >> Hope this helps, >> >> Kendon >> >> ``` >> tmp_fun <- function(x){ >> iris_big <- lapply(1:10000, function(x) iris) >> lm(Sepal.Length ~ Sepal.Width, data = iris) >> } >> >> out <- tmp_fun(1) >> object.size(out) >> # 48008 >> save(out, file = "tmp.RData", compress = FALSE) >&...
2016 Jul 27
0
Model object, when generated in a function, saves entire environment when saved
...plicating whatever happens when saving the model that was > generated in .GlobalEnv at the return() stage of the function call > would fix this problem. > > I was referred to this list from r-bugs. First time r-devel poster. > > Hope this helps, > > Kendon > > ``` > tmp_fun <- function(x){ > iris_big <- lapply(1:10000, function(x) iris) > lm(Sepal.Length ~ Sepal.Width, data = iris) > } > > out <- tmp_fun(1) > object.size(out) > # 48008 > save(out, file = "tmp.RData", compress = FALSE) > file.size("tmp.RData")...
2016 Jul 27
0
Model object, when generated in a function, saves entire environment when saved
...the return() stage of the function call > >> would fix this problem. > >> > >> I was referred to this list from r-bugs. First time r-devel poster. > >> > >> Hope this helps, > >> > >> Kendon > >> > >> ``` > >> tmp_fun <- function(x){ > >> iris_big <- lapply(1:10000, function(x) iris) > >> lm(Sepal.Length ~ Sepal.Width, data = iris) > >> } > >> > >> out <- tmp_fun(1) > >> object.size(out) > >> # 48008 > >> save(out, file = "...
2020 Jan 29
2
Model object, when generated in a function, saves entire environment when saved
...>> >> would fix this problem. >> >> >> >> I was referred to this list from r-bugs. First time r-devel poster. >> >> >> >> Hope this helps, >> >> >> >> Kendon >> >> >> >> ``` >> >> tmp_fun <- function(x){ >> >> iris_big <- lapply(1:10000, function(x) iris) >> >> lm(Sepal.Length ~ Sepal.Width, data = iris) >> >> } >> >> >> >> out <- tmp_fun(1) >> >> object.size(out) >> >> # 48008 >>...