Nothing
path_to_test_libsvm <- "fixtures/genomes_libsvm/"
tmp_out_dir <- file.path(tempdir(), "data_converters_tests/")
test_that("test combine files", {
unlink(tmp_out_dir, recursive = TRUE)
split_and_combine_files(path_to_files = path_to_test_libsvm,
train_target_path = file.path(tmp_out_dir, "train.txt"),
test_target_path = file.path(tmp_out_dir, "test.txt"),
names_backup = file.path(tmp_out_dir, "names.csv"),
split = 1)
expect_true(file.exists(file.path(tmp_out_dir, "train.txt")))
# test progress bar
unlink(tmp_out_dir, recursive = TRUE)
progressr::with_progress({
split_and_combine_files(path_to_files = path_to_test_libsvm,
train_target_path = file.path(tmp_out_dir, "train.txt"),
test_target_path = file.path(tmp_out_dir, "test.txt"),
names_backup = file.path(tmp_out_dir, "names.csv"),
split = 1)
})
# list files instead
unlink(tmp_out_dir, recursive = TRUE)
filenames <- list.files(path_to_test_libsvm, full.names = TRUE,
pattern = "*.txt")
progressr::with_progress({
split_and_combine_files(path_to_files = filenames,
train_target_path = file.path(tmp_out_dir, "train.txt"),
test_target_path = file.path(tmp_out_dir, "test.txt"),
names_backup = file.path(tmp_out_dir, "names.csv"),
split = 0)
})
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.