check.path {this.path} | R Documentation |
this.path()
is Functioning Correctly
Add check.path("path/to/file")
to the beginning of your script to
initialize this.path()
, and check that this.path()
is
returning the path you expect.
check.path(...)
check.dir(...)
... |
further arguments passed to |
If the expected path / / directory matches this.path()
/ /
this.dir()
, then TRUE
invisibly.
Otherwise, an error is raised.
# I have a project called 'EOAdjusted'
#
# Within this project, I have a folder called 'code'
# where I place all of my scripts.
#
# One of these scripts is called 'provrun.R'
#
# So, at the top of that R script, I could write:
# this.path::check.path("EOAdjusted", "code", "provrun.R")
#
# or
#
# this.path::check.path("EOAdjusted/code/provrun.R")