-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.rmd
More file actions
106 lines (70 loc) · 3.4 KB
/
README.rmd
File metadata and controls
106 lines (70 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
link_repo <- "https://github.com/PIFSC-Protected-Species-Division/crputils"
```
[](https://pifsc-protected-species-division.r-universe.dev/crputils)
# crputils
<!-- badges: start -->
<!-- badges: end -->
Miscellaneous R utilities used by CRP
What?! It's an R package!!
## Installation
### R-Universe
#### Binary
```{r, eval = FALSE}
install.packages('crputils',
repos=c('https://pifsc-protected-species-division.r-universe.dev','https://cloud.r-project.org')
)
```
#### Source
*You will need a C++ compiler for R*
```{r, eval = FALSE}
install.packages('crputils', type='source',
repos=c('https://pifsc-protected-species-division.r-universe.dev','https://cloud.r-project.org')
)
```
### GitHub
*You will need a C++ compiler for R*
```{r, eval = FALSE}
remotes::install_github('pifsc-protected-species-division/crputils')
```
## Components:
### FLAC converter
See `exampleWorkflows/workflow_flacConversion.R` for an example script
#### Convert a directory of WAV files to FLAC
```
path_flac <- "" # will prompt to find path. e.g., 'C:/users/user.name/programs/flac-1.5.0-win/Win64/flac.exe'
inDir <- 'F:\\wavFiles'
outDir <- 'F:\\flacFiles\\' # must have final slash!
numCh <- 4 # number of channels. Optional, default is 1
wav2flac(path_flac, inDir, outDir, numCh)
```
#### Convert a directory of FLAC files to WAV
```
path_flac <- "" # will prompt to find path. e.g., 'C:/users/user.name/programs/flac-1.5.0-win/Win64/flac.exe'
inDir <- 'F:\\flacFiles'
outDir <- 'F:\\wavFiles\\' # must have final slash!
numCh <- 4 # number of channels. Optional, default is 1
flac2wav(path_flac, inDir, outDir, numCh)
```
### Acoustic event summary report functions
Everything that starts with `er_` is used in event summary creation.
### Latitude/longitude format conversions
Functions to convert between different latitude/longitude formats. Includes:
- Decimal degrees (DD) TO degrees decimal seconds (DMM) or degrees minutes seconds (DMS)
- Degrees decimal minutes (DMM) TO decimal degrees (DD) or degrees minutes seconds (DMS)
- Degrees minutes seconds (DMS) TO decimal degrees (DD) or degrees decimal minutes (DMM)
See [`exampleWorkflows/workflow_latLonCov`](https://github.com/PIFSC-Protected-Species-Division/crputils/blob/main/exampleWorkflows/workflow_latLonConv.R) for example script to use these functions.
### GPX creation
Functions to convert tables of lat/lon data to GPX files readable by Coastal Explorer
## Disclaimer
*This software package is developed and maintained by scientists at the NOAA Fisheries Pacific Islands Fisheries Science Center and should be considered a fundamental research communication. The recommendations and conclusions presented here are those of the authors and this software should not be construed as official communication by NMFS, NOAA, or the U.S. Dept. of Commerce. In addition, reference to trade names does not imply endorsement by the National Marine Fisheries Service, NOAA. While the best efforts have been made to insure the highest quality, tools such as this are under constant development and are subject to change.*