Skip to content

An R 📦 to safely set & use a path to a private network

License

Notifications You must be signed in to change notification settings

bcgov/safepaths

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R-CMD-check imgLicense

safepaths

An R package 📦 to safely set & use a path to a private network.

Features

The package has 3 functions to safely set & use a path to a private network:

  • set_network_path(): adds an environment variable called SAFEPATHS_NETWORK_PATH to your .Renviron file and sets the variable to a provided network path.

  • get_network_path(): retrieves the environment variable SAFEPATHS_NETWORK_PATH, which is stored in your .Renviron file using set_network_path().

  • use_network_path(): retrieves and uses the stored network path in conjunction with a provided file or folder path.

use_network_path("file.csv")
use_network_path("folder_name/file.csv")

Installation

You can install the package directly from this repository. To do so, you will need the remotes package:

install.packages("remotes")

Next, install safepaths package using remotes::install_github():

library("remotes")
install_github("bcgov/safepaths")

Tips for Finding the Network Path

  • For Windows users: you can use the mapped drive letter or the UNC network path, e.g., "P:/folder_name" or "//UNC_path".
  • For Mac users: your mounted network path will look something like "/Volumes/server_name/folder_name". You can find the server_name for mounted remote drives by opening the Terminal and asking with this code ls /Volumes.

Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an issue.

How to Contribute

If you would like to contribute to the package, please see our CONTRIBUTING guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

Copyright 2020 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.

This project was created using the bcgovr package.