Function to Concatenate File Path Components in R (Example Code)

This page shows how to construct a directory path using the file.path function in the R programming language.

Apply file.path() Function to Construct a Path to a Folder

file.path("C:",
          "Users",
          "Data Hacks",
          "Desktop",
          "My Folder")
# [1] "C:/Users/Data Hacks/Desktop/My Folder"

Leave a Reply

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

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top