Skip to content

Commit

Permalink
Working on SQLite switch-over
Browse files Browse the repository at this point in the history
  • Loading branch information
kaybenleroll committed Jun 20, 2023
1 parent e5d25a8 commit 18be76e
Show file tree
Hide file tree
Showing 5 changed files with 463 additions and 468 deletions.
2 changes: 2 additions & 0 deletions btydbayes_investigation.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Makefile

MarkdownReferences: Document
23 changes: 23 additions & 0 deletions calculate_var_sizes.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

calculate_object_size <- function(x) {
message(glue("Calculating size for object {x}"))

size <- x |>
get() |>
obj_size()

return(size)
}


var_sizes_tbl <- ls() |>
enframe(name = NULL, value = "object_name") |>
mutate(
object_size = map_dbl(
object_name, calculate_object_size,
.progress = FALSE
),
object_size_mb = object_size / (1024 * 1024)
)

var_sizes_tbl |> glimpse()
Loading

0 comments on commit 18be76e

Please sign in to comment.