SlideShare a Scribd company logo
Copyright (c) WLOG Solutions
Managing large (and small)
R based solutions with
R Suite
Wit Jakuczun,
WLOG Solutions
2017-09-29
Copyright (c) WLOG Solutions 2
Open-source is a leader the
race in advanced analytics
using GPU engines and power
of its community.
Copyright (c) WLOG Solutions 3
Copyright (c) WLOG Solutions 4
Example?
Copyright (c) WLOG Solutions 5
4000x4 elastic-net models (CV-5) for 45Kx10K dataset
in 1,5 minute!
Copyright (c) WLOG Solutions 6
Join 21st centuRy today!
Copyright (c) WLOG Solutions
What is R?
7
Copyright (c) WLOG Solutions 8
Dynamically interpreted
general programming language
Copyright (c) WLOG Solutions 9
Stable open-source product
developed by R Foundation
since ~1995 year.
Copyright (c) WLOG Solutions 10
Created for
data analysis.
Copyright (c) WLOG Solutions 11
flights %>%
group_by(year, month, day) %>%
select(arr_delay, dep_delay) %>%
summarise(
arr = mean(arr_delay, na.rm = TRUE),
dep = mean(dep_delay, na.rm = TRUE)
) %>%
filter(arr > 30 | dep > 30)
z <- scaled_input %>%
layer_convolution2D(c(5,5), 32, pad = TRUE) %>%
layer_max_pooling(c(3,3), c(2,2)) %>%
layer_convolution2D(c(3,3), 48) %>%
layer_max_pooling(c(3,3), c(2,2)) %>%
layer_convolution2D(c(3,3), 64) %>%
layer_dense(96) %>%
layer_dropout(0.5) %>%
layer_dense(num_output_classes,
activation = activation_softmax())
Data preparation Predictive model building
Copyright (c) WLOG Solutions 12
R is a community.
Copyright (c) WLOG Solutions 13
CRAN
10K+ packages
GitHub
more and more
popular
Copyright (c) WLOG Solutions 14
However, out-of-the-box R does not
provide many essential features required
In a large-scale production deployment!
Copyright (c) WLOG Solutions 15
R Software Development
What is a large scale?
Copyright (c) WLOG Solutions 16
R software development
vs
R scripting
Copyright (c) WLOG Solutions 17
Large scale ~ 10K+ LOC
Small scale ~ 1K LOC
Copyright (c) WLOG Solutions 18
Examples of large scale projects
Copyright (c) WLOG Solutions 19
Historical
data
Traffic
forecasting
Workforce
optimiser
Busines rules
Human intervention
Results
Efficiency
curves
Workforce optimisation
Copyright (c) WLOG Solutions 20
Historical
data
Cash flow
“forecasting”
Optimisation
phase I
Optimisation
phase II
Business rules
Human intervention
Results
FONG
Cash optimization
Copyright (c) WLOG Solutions 21
Production Dev
Continuous
integration
Version
control
R Studio Server
Data-science team
Copyright (c) WLOG Solutions 22
R Software Development
What does R give us “out-of-the-box”?
Copyright (c) WLOG Solutions 23
Dev
Version control
Continuous
Integration &
Deployment
Prod
Software development process
Copyright (c) WLOG Solutions 24
What is nice about R?
Copyright (c) WLOG Solutions 25
Package help
system
Package
dependency
system
External data in
packages
Vignettes Tests
Copyright (c) WLOG Solutions 26
Where does R have its rough edges?
Copyright (c) WLOG Solutions 27
CRAN (MRAN) Github Other
Dev environment
Installed packages
Local CRAN
Source code
repo
Copyright (c) WLOG Solutions 28
install.packages(“ggplot2”)
Copyright (c) WLOG Solutions 29
CRAN (MRAN) Github Other
Dev environment
Installed packages
Local CRAN
Source code
repo
Copyright (c) WLOG Solutions 30
Teaser
Alcohol concentration in blood
Copyright (c) WLOG SolutionsCopyright (c) WLOG Solutions 31
Instruction (Windows only!)
1. Install vanilla R 3.4.2
2. Download package
(https://goo.gl/RnZAQg)
3. Unzip
4. Open CMD
5. Rscript R/master.R 
--port=7137
6. In browser open
http://localhost:7137
http://www.sumsar.net/blog/2014/07/estimate-your-bac-using-drinkr/
Copyright (c) WLOG Solutions 32
R Software Development
R Suite walk-through
Copyright (c) WLOG Solutions 33
Preliminaries
Copyright (c) WLOG Solutions 34
Install R
https://cran.r-project.org/bin/windows/base/R-3.4.2-win.exe
Copyright (c) WLOG Solutions
Install R Suite
35
http://rsuite.io/RSuite_Download.php
Copyright (c) WLOG Solutions
Development cycle with R Suite
36
1. Start a project
2. Add a package to the project
a. Develop the package (using devtools)
3. Add dependencies to the project
4. Build the package
5. Build a deployment package
Copyright (c) WLOG Solutions 37
Open tutorial
http://rsuite.io/RSuite_Tutorial.php?article=basic_workflow.md
Copyright (c) WLOG Solutions 38
Copyright (c) WLOG Solutions 39
Project structure
Copyright (c) WLOG Solutions 40
deployment
logs
packages
R
tests
import
export
work
Where all the
packages are
installed.
Copyright (c) WLOG Solutions 41
deployment
logs
packages
R
tests
import
export
work
Where all the logs
are stored.
Copyright (c) WLOG Solutions 42
deployment
logs
packages
R
tests
import
export
work
Where all the
project packages
are stored.
Copyright (c) WLOG Solutions 43
deployment
logs
packages
R
tests
import
export
work
Where master
scripts (~ main) are
stored.
Copyright (c) WLOG Solutions 44
deployment
logs
packages
R
tests
import
export
work
Where project tests
are stored.
Copyright (c) WLOG Solutions 45
deployment
logs
packages
R
tests
import
export
work
(Optional)
Raw data to be
imported.
Copyright (c) WLOG Solutions 46
deployment
logs
packages
R
tests
import
export
work
(Optional)
Results generated
by our R program.
Copyright (c) WLOG Solutions 47
deployment
logs
packages
R
tests
import
export
work
(Optional)
Temporary results.
Copyright (c) WLOG Solutions 48
Configuration files.
Copyright (c) WLOG Solutions 49
RSuiteVersion: 0.10.212
RVersion: 3.3
Project: myproject
Repositories: MRAN[2017-09-28],
Dir[]
Artifacts: config_templ.txt
Example
PARAMETERS
● RVersion - R version for this
project
● Project - project name
● Repositories
○ MRAN[YYYY-MM-DD],
○ S3[URL]
○ URL[URL]
○ Dir[]
● Artifacts - what else should be
added to deployment
package.
Copyright (c) WLOG Solutions 50
LogLevel: INFO
N_days: 365
solver_max_iterations: 10
solver_opt_horizon: 8
Example
config_templ.txt (config.txt)
● LogLevel - level for loggers
● _templ.txt - template for config
● config.txt - deployment version
Copyright (c) WLOG Solutions 51
Copyright (c) WLOG Solutions 52
master.R
Here goes your code...
Autodected path
of master.R
There can be many master
scripts!
Copyright (c) WLOG Solutions 53
Put all logic into packages
Copyright (c) WLOG Solutions 54
Copyright (c) WLOG Solutions 55
Select external packages carefully.
And control their versions!
Copyright (c) WLOG Solutions 56
data.table
Copyright (c) WLOG Solutions 57
Copyright (c) WLOG Solutions 58
print is not for logging.
Forbidden
Copyright (c) WLOG Solutions 59
loginfo("Phase 1 passed")
logdebug("Iter %d done", i)
logwarning("Are you sure?")
logerror("I failed :(")
Copyright (c) WLOG Solutions 60
pkg_loginfo("Phase 1 passed")
pkg_logdebug("Iter %d done", i)
pkg_logwarning("Are you sure?")
pkg_logerror("I failed :(")
Copyright (c) WLOG Solutions 61
Automate building, deploying, testing,
etc.
Copyright (c) WLOG Solutions
Wit Jakuczun, PhD
wit.jakuczun@wlogsolutions.com
62
Field tested R ecosystem for Enterprise
http://rsuite.io

More Related Content

PDF
Know your R usage workflow to handle reproducibility challenges
PDF
Case Studies in advanced analytics with R
PPTX
Bringing the Power of LocalSolver to R: a Real-Life Case-Study
PDF
Primers or Reminders? The Effects of Existing Review Comments on Code Review
PDF
Processing malaria HTS results using KNIME: a tutorial
PDF
Let’s talk about reproducible data analysis
PDF
Decentralized Evolution and Consolidation of RDF Graphs
PDF
Some "challenges" on the open-source/open-data front
Know your R usage workflow to handle reproducibility challenges
Case Studies in advanced analytics with R
Bringing the Power of LocalSolver to R: a Real-Life Case-Study
Primers or Reminders? The Effects of Existing Review Comments on Code Review
Processing malaria HTS results using KNIME: a tutorial
Let’s talk about reproducible data analysis
Decentralized Evolution and Consolidation of RDF Graphs
Some "challenges" on the open-source/open-data front

What's hot (20)

PDF
On the Role of the GRAPH Clause in the Performance of Federated SPARQL Queries
PDF
This Helix Nebula Science Cloud Pilot Phase Open Session
PDF
How Do You Build and Validate 1500 Models and What Can You Learn from Them?
PPTX
OpenACC Monthly Highlights: February 2022
PPTX
NLP2API: Replication package accepted by ICSME 2018
PPTX
OpenACC Monthly Highlights: June 2020
PPTX
Integration of static and dynamic analysis for understanding legacy source code
PPTX
OpenACC Monthly Highlights: July 2021
PDF
On unifying query languages for RDF streams
PPTX
OpenACC Highlights: 2019 Year in Review
PPTX
OpenACC Monthly Highlights: March 2021
PPTX
OpenACC Monthly Highlights: August 2020
PDF
The Past, Present, and Future of OpenACC
PPTX
OpenACC Monthly Highlights: June 2021
PPTX
OpenACC Highlights: GTC Digital April 2020
PPTX
OpenACC Monthly Highlights: May 2019
PDF
ACS San Diego - The RDKit: Open-source cheminformatics
PPTX
Quick and Dirty: Scaling Out Predictive Models Using Revolution Analytics on ...
PPTX
OpenACC Monthly Highlights: February 2021
PDF
IJCAR 2018 keynote: Industrial Data Access
On the Role of the GRAPH Clause in the Performance of Federated SPARQL Queries
This Helix Nebula Science Cloud Pilot Phase Open Session
How Do You Build and Validate 1500 Models and What Can You Learn from Them?
OpenACC Monthly Highlights: February 2022
NLP2API: Replication package accepted by ICSME 2018
OpenACC Monthly Highlights: June 2020
Integration of static and dynamic analysis for understanding legacy source code
OpenACC Monthly Highlights: July 2021
On unifying query languages for RDF streams
OpenACC Highlights: 2019 Year in Review
OpenACC Monthly Highlights: March 2021
OpenACC Monthly Highlights: August 2020
The Past, Present, and Future of OpenACC
OpenACC Monthly Highlights: June 2021
OpenACC Highlights: GTC Digital April 2020
OpenACC Monthly Highlights: May 2019
ACS San Diego - The RDKit: Open-source cheminformatics
Quick and Dirty: Scaling Out Predictive Models Using Revolution Analytics on ...
OpenACC Monthly Highlights: February 2021
IJCAR 2018 keynote: Industrial Data Access
Ad

Similar to Managing large (and small) R based solutions with R Suite (20)

PDF
Managing large scale projects in R with R Suite
PPTX
How to lock a Python in a cage? Managing Python environment inside an R project
PDF
gopaddle-meetup
PDF
How to Build a High-Performance VM for Squeak/Smalltalk in Your Spare Time: A...
PDF
Big Data Europe SC6 WS #3: Big Data Europe Platform: Apps, challenges, goals ...
PDF
TDC2017 | São Paulo - Trilha BigData How we figured out we had a SRE team at ...
PDF
How to build an ETL pipeline with Apache Beam on Google Cloud Dataflow
PDF
Simple is Not Necessarily Better: Why Software Productivity Factors Can Lead...
PDF
(Costless) Software Abstractions for Parallel Architectures
PPTX
AzureDay Kyiv 2016 Release Management
PDF
Always Be Deploying. How to make R great for machine learning in (not only) E...
PDF
goPaddle Quick Introduction
PDF
Industrializing Machine learning pipelines
PDF
Value stream mapping for DevOps
PDF
Fundamentals of DevOps for Data Testing Course - Module 4
PPTX
CMPT470-usask-guest-lecture
PPTX
Breaking the 2 Pizza Paradox with your Platform as an Application
PDF
Free GitOps Workshop
PDF
Building a Remote Control Robot with Automotive Grade Linux
PDF
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...
Managing large scale projects in R with R Suite
How to lock a Python in a cage? Managing Python environment inside an R project
gopaddle-meetup
How to Build a High-Performance VM for Squeak/Smalltalk in Your Spare Time: A...
Big Data Europe SC6 WS #3: Big Data Europe Platform: Apps, challenges, goals ...
TDC2017 | São Paulo - Trilha BigData How we figured out we had a SRE team at ...
How to build an ETL pipeline with Apache Beam on Google Cloud Dataflow
Simple is Not Necessarily Better: Why Software Productivity Factors Can Lead...
(Costless) Software Abstractions for Parallel Architectures
AzureDay Kyiv 2016 Release Management
Always Be Deploying. How to make R great for machine learning in (not only) E...
goPaddle Quick Introduction
Industrializing Machine learning pipelines
Value stream mapping for DevOps
Fundamentals of DevOps for Data Testing Course - Module 4
CMPT470-usask-guest-lecture
Breaking the 2 Pizza Paradox with your Platform as an Application
Free GitOps Workshop
Building a Remote Control Robot with Automotive Grade Linux
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...
Ad

More from Wit Jakuczun (10)

PDF
recommendation = optimization(prediction)
PDF
Driving your marketing automation with multi-armed bandits in real time
PDF
Large scale machine learning projects with r suite
PDF
20170928 why r_r jako główna platforma do zaawansowanej analityki w enterprise
PDF
Wit jakuczun dss_conf_2017_jak_wdrazac_r_w_enterprise
PDF
ANALYTICS WITHOUT LOSS OF GENERALITY
PDF
Showcase: on segmentation importance for marketing campaign in retail using R...
PDF
20150521 ser protecto_r_final
PDF
Rozwiązywanie problemów optymalizacyjnych (z przykładem w R)
PDF
R+H2O - idealny tandem do analityki predykcyjnej?
recommendation = optimization(prediction)
Driving your marketing automation with multi-armed bandits in real time
Large scale machine learning projects with r suite
20170928 why r_r jako główna platforma do zaawansowanej analityki w enterprise
Wit jakuczun dss_conf_2017_jak_wdrazac_r_w_enterprise
ANALYTICS WITHOUT LOSS OF GENERALITY
Showcase: on segmentation importance for marketing campaign in retail using R...
20150521 ser protecto_r_final
Rozwiązywanie problemów optymalizacyjnych (z przykładem w R)
R+H2O - idealny tandem do analityki predykcyjnej?

Recently uploaded (20)

PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPT
Quality review (1)_presentation of this 21
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
Computer network topology notes for revision
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PDF
Mega Projects Data Mega Projects Data
PDF
Foundation of Data Science unit number two notes
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
climate analysis of Dhaka ,Banglades.pptx
PDF
.pdf is not working space design for the following data for the following dat...
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Quality review (1)_presentation of this 21
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Introduction to Knowledge Engineering Part 1
Computer network topology notes for revision
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
Mega Projects Data Mega Projects Data
Foundation of Data Science unit number two notes
oil_refinery_comprehensive_20250804084928 (1).pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Data_Analytics_and_PowerBI_Presentation.pptx
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
IBA_Chapter_11_Slides_Final_Accessible.pptx
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
climate analysis of Dhaka ,Banglades.pptx
.pdf is not working space design for the following data for the following dat...

Managing large (and small) R based solutions with R Suite

  • 1. Copyright (c) WLOG Solutions Managing large (and small) R based solutions with R Suite Wit Jakuczun, WLOG Solutions 2017-09-29
  • 2. Copyright (c) WLOG Solutions 2 Open-source is a leader the race in advanced analytics using GPU engines and power of its community.
  • 3. Copyright (c) WLOG Solutions 3
  • 4. Copyright (c) WLOG Solutions 4 Example?
  • 5. Copyright (c) WLOG Solutions 5 4000x4 elastic-net models (CV-5) for 45Kx10K dataset in 1,5 minute!
  • 6. Copyright (c) WLOG Solutions 6 Join 21st centuRy today!
  • 7. Copyright (c) WLOG Solutions What is R? 7
  • 8. Copyright (c) WLOG Solutions 8 Dynamically interpreted general programming language
  • 9. Copyright (c) WLOG Solutions 9 Stable open-source product developed by R Foundation since ~1995 year.
  • 10. Copyright (c) WLOG Solutions 10 Created for data analysis.
  • 11. Copyright (c) WLOG Solutions 11 flights %>% group_by(year, month, day) %>% select(arr_delay, dep_delay) %>% summarise( arr = mean(arr_delay, na.rm = TRUE), dep = mean(dep_delay, na.rm = TRUE) ) %>% filter(arr > 30 | dep > 30) z <- scaled_input %>% layer_convolution2D(c(5,5), 32, pad = TRUE) %>% layer_max_pooling(c(3,3), c(2,2)) %>% layer_convolution2D(c(3,3), 48) %>% layer_max_pooling(c(3,3), c(2,2)) %>% layer_convolution2D(c(3,3), 64) %>% layer_dense(96) %>% layer_dropout(0.5) %>% layer_dense(num_output_classes, activation = activation_softmax()) Data preparation Predictive model building
  • 12. Copyright (c) WLOG Solutions 12 R is a community.
  • 13. Copyright (c) WLOG Solutions 13 CRAN 10K+ packages GitHub more and more popular
  • 14. Copyright (c) WLOG Solutions 14 However, out-of-the-box R does not provide many essential features required In a large-scale production deployment!
  • 15. Copyright (c) WLOG Solutions 15 R Software Development What is a large scale?
  • 16. Copyright (c) WLOG Solutions 16 R software development vs R scripting
  • 17. Copyright (c) WLOG Solutions 17 Large scale ~ 10K+ LOC Small scale ~ 1K LOC
  • 18. Copyright (c) WLOG Solutions 18 Examples of large scale projects
  • 19. Copyright (c) WLOG Solutions 19 Historical data Traffic forecasting Workforce optimiser Busines rules Human intervention Results Efficiency curves Workforce optimisation
  • 20. Copyright (c) WLOG Solutions 20 Historical data Cash flow “forecasting” Optimisation phase I Optimisation phase II Business rules Human intervention Results FONG Cash optimization
  • 21. Copyright (c) WLOG Solutions 21 Production Dev Continuous integration Version control R Studio Server Data-science team
  • 22. Copyright (c) WLOG Solutions 22 R Software Development What does R give us “out-of-the-box”?
  • 23. Copyright (c) WLOG Solutions 23 Dev Version control Continuous Integration & Deployment Prod Software development process
  • 24. Copyright (c) WLOG Solutions 24 What is nice about R?
  • 25. Copyright (c) WLOG Solutions 25 Package help system Package dependency system External data in packages Vignettes Tests
  • 26. Copyright (c) WLOG Solutions 26 Where does R have its rough edges?
  • 27. Copyright (c) WLOG Solutions 27 CRAN (MRAN) Github Other Dev environment Installed packages Local CRAN Source code repo
  • 28. Copyright (c) WLOG Solutions 28 install.packages(“ggplot2”)
  • 29. Copyright (c) WLOG Solutions 29 CRAN (MRAN) Github Other Dev environment Installed packages Local CRAN Source code repo
  • 30. Copyright (c) WLOG Solutions 30 Teaser Alcohol concentration in blood
  • 31. Copyright (c) WLOG SolutionsCopyright (c) WLOG Solutions 31 Instruction (Windows only!) 1. Install vanilla R 3.4.2 2. Download package (https://goo.gl/RnZAQg) 3. Unzip 4. Open CMD 5. Rscript R/master.R --port=7137 6. In browser open http://localhost:7137 http://www.sumsar.net/blog/2014/07/estimate-your-bac-using-drinkr/
  • 32. Copyright (c) WLOG Solutions 32 R Software Development R Suite walk-through
  • 33. Copyright (c) WLOG Solutions 33 Preliminaries
  • 34. Copyright (c) WLOG Solutions 34 Install R https://cran.r-project.org/bin/windows/base/R-3.4.2-win.exe
  • 35. Copyright (c) WLOG Solutions Install R Suite 35 http://rsuite.io/RSuite_Download.php
  • 36. Copyright (c) WLOG Solutions Development cycle with R Suite 36 1. Start a project 2. Add a package to the project a. Develop the package (using devtools) 3. Add dependencies to the project 4. Build the package 5. Build a deployment package
  • 37. Copyright (c) WLOG Solutions 37 Open tutorial http://rsuite.io/RSuite_Tutorial.php?article=basic_workflow.md
  • 38. Copyright (c) WLOG Solutions 38
  • 39. Copyright (c) WLOG Solutions 39 Project structure
  • 40. Copyright (c) WLOG Solutions 40 deployment logs packages R tests import export work Where all the packages are installed.
  • 41. Copyright (c) WLOG Solutions 41 deployment logs packages R tests import export work Where all the logs are stored.
  • 42. Copyright (c) WLOG Solutions 42 deployment logs packages R tests import export work Where all the project packages are stored.
  • 43. Copyright (c) WLOG Solutions 43 deployment logs packages R tests import export work Where master scripts (~ main) are stored.
  • 44. Copyright (c) WLOG Solutions 44 deployment logs packages R tests import export work Where project tests are stored.
  • 45. Copyright (c) WLOG Solutions 45 deployment logs packages R tests import export work (Optional) Raw data to be imported.
  • 46. Copyright (c) WLOG Solutions 46 deployment logs packages R tests import export work (Optional) Results generated by our R program.
  • 47. Copyright (c) WLOG Solutions 47 deployment logs packages R tests import export work (Optional) Temporary results.
  • 48. Copyright (c) WLOG Solutions 48 Configuration files.
  • 49. Copyright (c) WLOG Solutions 49 RSuiteVersion: 0.10.212 RVersion: 3.3 Project: myproject Repositories: MRAN[2017-09-28], Dir[] Artifacts: config_templ.txt Example PARAMETERS ● RVersion - R version for this project ● Project - project name ● Repositories ○ MRAN[YYYY-MM-DD], ○ S3[URL] ○ URL[URL] ○ Dir[] ● Artifacts - what else should be added to deployment package.
  • 50. Copyright (c) WLOG Solutions 50 LogLevel: INFO N_days: 365 solver_max_iterations: 10 solver_opt_horizon: 8 Example config_templ.txt (config.txt) ● LogLevel - level for loggers ● _templ.txt - template for config ● config.txt - deployment version
  • 51. Copyright (c) WLOG Solutions 51
  • 52. Copyright (c) WLOG Solutions 52 master.R Here goes your code... Autodected path of master.R There can be many master scripts!
  • 53. Copyright (c) WLOG Solutions 53 Put all logic into packages
  • 54. Copyright (c) WLOG Solutions 54
  • 55. Copyright (c) WLOG Solutions 55 Select external packages carefully. And control their versions!
  • 56. Copyright (c) WLOG Solutions 56 data.table
  • 57. Copyright (c) WLOG Solutions 57
  • 58. Copyright (c) WLOG Solutions 58 print is not for logging. Forbidden
  • 59. Copyright (c) WLOG Solutions 59 loginfo("Phase 1 passed") logdebug("Iter %d done", i) logwarning("Are you sure?") logerror("I failed :(")
  • 60. Copyright (c) WLOG Solutions 60 pkg_loginfo("Phase 1 passed") pkg_logdebug("Iter %d done", i) pkg_logwarning("Are you sure?") pkg_logerror("I failed :(")
  • 61. Copyright (c) WLOG Solutions 61 Automate building, deploying, testing, etc.
  • 62. Copyright (c) WLOG Solutions Wit Jakuczun, PhD wit.jakuczun@wlogsolutions.com 62 Field tested R ecosystem for Enterprise http://rsuite.io