richelbilderbeek / razzo

Research project by Giovanni Laudanno and Richel J.C. Bilderbeek
GNU General Public License v3.0
2 stars 2 forks source link

Write 'create_mbd_params_file' #255

Closed richelbilderbeek closed 5 years ago

richelbilderbeek commented 5 years ago

We already have quite some useful create_something_file functions. We do lack a file that puts the MBD parameters in one table, with one set of MBD parameters per run/folder/setting.

I wrote the test for it, here's only the top:

test_that("use", {

  skip("Issue 255, Issue #255")

  # Should create 'results/'mbd_params.csv'
  filename <- create_mbd_params_file(
    project_folder_name = get_razzo_path("razzo_project")
  )
  # ...
})
richelbilderbeek commented 5 years ago

@Giappo: would you be up to write this one?

richelbilderbeek commented 5 years ago

This is the PBD/raket version, this one will be very similar:

#' Collect all PBD parameters of a \code{raket_werper} run and put these
#' in one \code{.csv} file called \code{results/pbd_params.csv}
#' @inheritParams default_params_doc
#' @return the name of the file created
#' @author Richel J.C. Bilderbeek
#' @export
create_pbd_params_file <- function(
  project_folder_name = get_raket_path("raket_werper")
) {
  df <- collect_pbd_params(project_folder_name)
  filename <- file.path(project_folder_name, "results", "pbd_params.csv")
  dir.create(path = dirname(filename), showWarnings = FALSE, recursive = TRUE)
  write.csv(
    x = df,
    file = filename
  )
  filename
}
richelbilderbeek commented 5 years ago

@Giappo: I assign you this Issue, as I think you would enjoy it. No worries about the time: I will re-assign to myself when really needing this :+1:

richelbilderbeek commented 5 years ago

This works, well done :+1:

works

Closing the Issue :rainbow: