Giter VIP home page Giter VIP logo

Comments (4)

richelbilderbeek avatar richelbilderbeek commented on August 16, 2024

Screenshot from 2020-07-06 15-55-35
Screenshot from 2020-07-06 15-58-28

from pirouette.

richelbilderbeek avatar richelbilderbeek commented on August 16, 2024

100 folders in less than 10 seconds:

library(pirouette)
library(testthat)


#super_folder <- "/home/richel/pirouette_example_42/pirouette_example_42/example_42"
#super_folder <- "/media/richel/D2B40C93B40C7BEB/pirouette_examples/pirouette_example_18/example_18"
#super_folder <- "/home/richel/pirouette_example_42/pirouette_example_42/example_42"
super_folder <- "/home/richel/pirouette_example_32/pirouette_example_32/example_32"

folder_names <- list.dirs(
  super_folder
)
folder_names <- folder_names[folder_names != super_folder]
folder_names
expect_true(all(dir.exists(folder_names)))

long_pir_out <- create_long_pir_out_from_folders(folder_names = folder_names)
p <- pir_plot_from_long(long_pir_out)
p + ggplot2::ggtitle("") + ggplot2::ggsave("~/example_42.png", width = 7, height = 7)
p

from pirouette.

richelbilderbeek avatar richelbilderbeek commented on August 16, 2024

Glory to 👏👏👏 dplyr::bind_rows 👏👏👏

from pirouette.

richelbilderbeek avatar richelbilderbeek commented on August 16, 2024

Timing it:

library(pirouette)
library(testthat)


#super_folder <- "/home/richel/pirouette_example_42/pirouette_example_42/example_42"
#super_folder <- "/media/richel/D2B40C93B40C7BEB/pirouette_examples/pirouette_example_18/example_18"
#super_folder <- "/home/richel/pirouette_example_42/pirouette_example_42/example_42"
super_folder <- "/home/richel/pirouette_example_32/pirouette_example_32/example_32"

folder_names <- list.dirs(
  super_folder
)
folder_names <- folder_names[folder_names != super_folder]
folder_names
expect_true(all(dir.exists(folder_names)))

Sys.time()
long_pir_out <- create_tree_and_model_errors_from_folders(
  folder_names = folder_names
)
p <- pir_plot_from_long(long_pir_out)
p + ggplot2::ggtitle("") + ggplot2::ggsave("~/example_42.png", width = 7, height = 7)
p
Sys.time()

results in:

> Sys.time()
[1] "2020-07-14 12:50:19 CEST"
> long_pir_out <- create_tree_and_model_errors_from_folders(
+   folder_names = folder_names
+ )
> p <- pir_plot_from_long(long_pir_out)
> p + ggplot2::ggtitle("") + ggplot2::ggsave("~/example_42.png", width = 7, height = 7)
> p
> Sys.time()
[1] "2020-07-14 12:50:41 CEST"

That is 22 seconds!

from pirouette.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.