Learn R Programming

GREA (version 1.0)

wd_check: File-in-Working Directory checker

Description

Function to determine if a file lies in a working directory.

Usage

wd_check(filelocation)

Arguments

filelocation
A character string specifying a file location.

Value

A file location. Gives the file location without the working directory if the file is in it (also can be a subfolder), but returns the full path if not.

Examples

Run this code
filepath_test <- file.path(getwd(), "data", "testfile.csv")
wd_check(filepath_test)

Run the code above in your browser using DataLab