GetProjectName: Get the internal name used by dafR to reference the project

Description Usage Author(s)

Description

GetProjectName serves two purposes: to get the reference that the package uses internaly and also to create that reference if it wasn't used yet. This reference is created and saved in the first time GetProjectName is called in the open project.

When the function is called, it will check if the reference exists. If it does, it simply returns it. If it doesn't it will look for the Rproj file of RStudio. If the file exists in the working directory GetProjectName will use the filename without the extension and save it.

If both searches fail, GetProjectName will use the working directory name as the project name. If it doesn't get it from the Rproj file and save it in .dafRVars and return it. If there's more than one Rproj file (why would that happen I don't really know) pick the first one. If it doesn't get it from the working directory name, save it in .mrtEvn and return it

Usage

1

Author(s)

Ricardo Vladimiro


rvladimiro/dafR documentation built on June 26, 2019, 4:37 a.m.