Accendo Reliability

Your Reliability Engineering Professional Development Site

  • Home
  • About
    • Contributors
  • Reliability.fm
    • Speaking Of Reliability
    • Rooted in Reliability: The Plant Performance Podcast
    • Quality during Design
    • Way of the Quality Warrior
    • Critical Talks
    • Dare to Know
    • Maintenance Disrupted
    • Metal Conversations
    • The Leadership Connection
    • Practical Reliability Podcast
    • Reliability Matters
    • Reliability it Matters
    • Maintenance Mavericks Podcast
    • Women in Maintenance
    • Accendo Reliability Webinar Series
  • Articles
    • CRE Preparation Notes
    • on Leadership & Career
      • Advanced Engineering Culture
      • Engineering Leadership
      • Managing in the 2000s
      • Product Development and Process Improvement
    • on Maintenance Reliability
      • Aasan Asset Management
      • AI & Predictive Maintenance
      • Asset Management in the Mining Industry
      • CMMS and Reliability
      • Conscious Asset
      • EAM & CMMS
      • Everyday RCM
      • History of Maintenance Management
      • Life Cycle Asset Management
      • Maintenance and Reliability
      • Maintenance Management
      • Plant Maintenance
      • Process Plant Reliability Engineering
      • ReliabilityXperience
      • RCM Blitz®
      • Rob’s Reliability Project
      • The Intelligent Transformer Blog
      • The People Side of Maintenance
      • The Reliability Mindset
    • on Product Reliability
      • Accelerated Reliability
      • Achieving the Benefits of Reliability
      • Apex Ridge
      • Metals Engineering and Product Reliability
      • Musings on Reliability and Maintenance Topics
      • Product Validation
      • Reliability Engineering Insights
      • Reliability in Emerging Technology
    • on Risk & Safety
      • CERM® Risk Insights
      • Equipment Risk and Reliability in Downhole Applications
      • Operational Risk Process Safety
    • on Systems Thinking
      • Communicating with FINESSE
      • The RCA
    • on Tools & Techniques
      • Big Data & Analytics
      • Experimental Design for NPD
      • Innovative Thinking in Reliability and Durability
      • Inside and Beyond HALT
      • Inside FMEA
      • Integral Concepts
      • Learning from Failures
      • Progress in Field Reliability?
      • R for Engineering
      • Reliability Engineering Using Python
      • Reliability Reflections
      • Testing 1 2 3
      • The Manufacturing Academy
  • eBooks
  • Resources
    • Accendo Authors
    • FMEA Resources
    • Feed Forward Publications
    • Openings
    • Books
    • Webinars
    • Journals
    • Higher Education
    • Podcasts
  • Courses
    • 14 Ways to Acquire Reliability Engineering Knowledge
    • Reliability Analysis Methods online course
    • Measurement System Assessment
    • SPC-Process Capability Course
    • Design of Experiments
    • Foundations of RCM online course
    • Quality during Design Journey
    • Reliability Engineering Statistics
    • Quality Engineering Statistics
    • An Introduction to Reliability Engineering
    • Reliability Engineering for Heavy Industry
    • An Introduction to Quality Engineering
    • Process Capability Analysis course
    • Root Cause Analysis and the 8D Corrective Action Process course
    • Return on Investment online course
    • CRE Preparation Online Course
    • Quondam Courses
  • Webinars
    • Upcoming Live Events
  • Calendar
    • Call for Papers Listing
    • Upcoming Webinars
    • Webinar Calendar
  • Login
    • Member Home

by Gabor Szabo Leave a Comment

Is Everything in Order?

Is Everything in Order?

Hopefully, you have already seen that utilizing R for engineering can unlock a host of powerful tools and techniques and give you the power of data visualization.

In using R, you will likely work with various objects (data files, scripts, analyses, reports etc.). As with other things, creating structure for how you accomplish things in R can be important for both effectiveness and efficiency.

RStudio has a very convenient feature called projects, which allows you to store everything related to a specific activity (say an engineering study or investigation) in a structured way. Take a look at this to see what projects are.

I’ve found that organizing everything in a project folder helps with a number of things; for one, everything is in one place so you don’t have to look for stuff. The other benefit is that once you crerate a project file and open that project in RStudio, the current working directory is set to the project directory, which is superuseful. I simply cannot emphasize enough how useful this is; if you have used RStudio, you know what I am talking about.

The create_project_folder() function

The create_project_folder() function of sherlock automates the task of creating a project file as well as an underlying subfolder structure (this is really the important part).

Let’s go through an example of what this looks like:

First, let’s say you decide to create a folder named Engineering_Projects to house your engineering projects – of course if you don’t already have one of those folders; maybe they are all over the place on your computer. Don’t worry, no judgement here, we’ve all been there!

# EDITION 010: CREATING A PROJECT SUBFOLDER STRUCTURE ----

# 0. LOAD PACKAGES ----
library(tidyverse)
library(sherlock)


# 1. CREATE A DIRECTORY NAMED ENGINEERING_PROJECTS ----
fs::dir_create(path = "Engineering_Projects")

You can either go about creating such a folder the good old-fashined way, that is manually in File Explorer (if you’re a Windows user), or you can do it programmatically using the dir_create() function from the fs package:

screen shot of RStudio showing new path to Engineering_Projects

Awesomesauce. Now, this is where the create_project_folder() function comes into play. Let’s run the below code:

# 2. USE CREATE_PROJECT_FOLDER() ----
sherlock::create_project_folder(folder_name = "001_XYZ_Study", path = "Engineering_Projects/")

What we are saying here is that we want to create the folder named 001_XYZ_Study under the Engineering_Projects folder. There is, however, a lot more to what this function does. Not only does it create the folder itself for you…

screen shot of RStudio showing new folder for 001_XYZ_Study

…it also creates a project file (001_XYZ_Study.Rproj) as well as a complete subfolder structure.

screen shot of RStudio showing new sub-folders

This simple piece of functionality is a real time-saver; it keeps things in order and helps you stay organized, and we know that being organized means that you have more time to spend on stuff that matters.

I hope you enjoyed this week’s edition.

Resources for this week’s edition:

  • sherlock package
  • fs package

Resources for learning R:

  • R for Data Science: a very thorough reference book by Hadley Wickham, the creator of the tidyverse. Absolutely free of charge and full of relevant examples and practice tests.
  • ggplot2 reference book: a super detailed online book on the gpplot2 plotting package.
  • My favorite R course, Business Science DS4B101-R: I learned R mainly throgh this course. Highly recommended if you want to get up to speed and beyond in a relatively short time. It has everything one will need from data cleaning to data visualization to modeling. This course is especially useful for engineers trying to learn or get good at R as it heavily focuses on the fundamentals but goes way beyond just that. Note: this is an affiliate link, meaning you get a hefty discount if you purchase a course, and I receive a small commission.

Filed Under: Articles, on Tools & Techniques, R for Engineering

About Gabor Szabo

Gabor is a quality engineering and data professional and has over 15 years of experience in quality having worked in the medical device, automotive and other manufacturing industries. He holds a BS in Engineering Management.

Gabor's specialties and interests include problem solving, statistical engineering and analysis through the use of data, and developing others.

« Understanding Anomaly Detection (AD) with the P-F Curve
The Fortune 500 and a Deceptive Communication Practice »

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

R for Engineering logo Photo of Gabor SzaboArticles by Gabor Szabo
in the R for Engineering article series

Join Accendo

Receive information and updates about articles and many other resources offered by Accendo Reliability by becoming a member.

It’s free and only takes a minute.

Join Today

Recent Posts

  • test
  • test
  • test
  • Your Most Important Business Equation
  • Your Suppliers Can Be a Risk to Your Project

© 2025 FMS Reliability · Privacy Policy · Terms of Service · Cookies Policy