Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bcgov/safepaths
An R 📦 to safely set & use a path to a private network
https://github.com/bcgov/safepaths
citz data-science r r-package rstats
Last synced: 8 days ago
JSON representation
An R 📦 to safely set & use a path to a private network
- Host: GitHub
- URL: https://github.com/bcgov/safepaths
- Owner: bcgov
- License: apache-2.0
- Created: 2020-11-30T23:20:33.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-17T21:17:59.000Z (almost 3 years ago)
- Last Synced: 2024-08-13T07:14:07.812Z (4 months ago)
- Topics: citz, data-science, r, r-package, rstats
- Language: R
- Homepage:
- Size: 44.9 KB
- Stars: 3
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - bcgov/safepaths - An R 📦 to safely set & use a path to a private network (R)
README
[![R-CMD-check](https://github.com/bcgov/safepaths/workflows/R-CMD-check/badge.svg)](https://github.com/bcgov/safepaths/actions)
[![img](https://img.shields.io/badge/Lifecycle-Stable-97ca00)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md)[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)## 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.
```{r}
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](https://github.com/hadley/devtools/) package:``` r
install.packages("remotes")
```Next, install `safepaths` package using
`remotes::install_github()`:``` r
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](https://github.com/bcgov/safepaths/issues/).
### How to Contribute
If you would like to contribute to the package, please see our [CONTRIBUTING](CONTRIBUTING.md) guidelines.
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
### License
```
Copyright 2020 Province of British ColumbiaLicensed 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 athttp://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](https://github.com/bcgov/bcgovr) package.*