search for: iris_big

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

2016 Jul 27
3
Model object, when generated in a function, saves entire environment when saved
...thing 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 in .GlobalEnv iris_big <-...
2016 Jul 27
2
Model object, when generated in a function, saves entire environment when saved
...lobalEnv 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") &g...
2016 Jul 27
0
Model object, when generated in a function, saves entire environment when saved
...ving 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 >...
2016 Jul 27
0
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 > >> save(out, file = "tmp.RData", compress = FALSE) > >...
2020 Jan 29
2
Model object, when generated in a function, saves entire environment when saved
...gt; >> >> >> 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",...