Skip to content

Commit 53a4552

Browse files
author
Max Czapanskiy
committed
Add more background and installation information to README. Correct a typo in the read_nc() documentation.
1 parent db8fd8f commit 53a4552

File tree

4 files changed

+55
-16
lines changed

4 files changed

+55
-16
lines changed

R/read.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#' * x (num) x coordinate of dead-reckoned track, relative to deployment location (m; eastings)
1919
#' * y (num) y coordinate of dead-reckoned track, relative to deployment location (m; northings)
2020
#' * z (num) z coordinate of dead-reckoned track, relative to deployment location (m; depth)
21+
#'
2122
#' And attributes:
2223
#' * whaleid (chr) e.g. "mn200312-58"
2324
#' * fs (num) sampling rate in Hz

README.Rmd

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ knitr::opts_chunk$set(
2121
[![codecov](https://codecov.io/gh/FlukeAndFeather/catsr/branch/master/graph/badge.svg?token=006B4PEFI0)](https://codecov.io/gh/FlukeAndFeather/catsr)
2222
<!-- badges: end -->
2323

24-
catsr reads and visualizes CATS PRH files.
24+
catsr is an R package for reading and visualizing CATS PRH files. For information on the PRH creation tools and workflow, see [CATS-Methods-Materials](https://github.com/wgough/CATS-Methods-Materials) and the [CATS Data Processing Workshop](https://catsworkshop.sites.stanford.edu/).
2525

2626
## Installation
2727

28-
You can install catsr from [GitHub](https://github.com/) with:
28+
catsr is available on [GitHub](https://github.com/) and you can install it using devtools package. If you don't have devtools installed, uncomment the line below. See section **Troubleshooting** at the end of this document for common errors.
2929

3030
``` r
3131
# install.packages("devtools")
3232
devtools::install_github("FlukeAndFeather/catsr")
3333
```
3434

35-
On Windows you might encounter `Error: Failed to install 'catsr' from GitHub: (converted from warning) cannot remove prior installation of package '___'`. The usual solution is: close all instances of R (including RStudio), start a new session, and try again.
35+
3636

3737
## Reading data
3838

39-
Read a CATS PRH file in NetCDF format. The .nc file for deployment mn200312-58 is included in the package.
39+
Read a CATS PRH file in netCDF format with read_nc(). The .nc file for deployment mn200312-58 is included in the package. Note: triaxial variables (aw, mw, gw) are stored as three-column matrices, so only the first column (corresponding to the x-axis) shows up in View().
4040

4141
```{r read}
4242
library(catsr)
@@ -47,7 +47,7 @@ mn200312_58_from_nc
4747

4848
## Visualizing data
4949

50-
Examine PRH variables (e.g. depth, pitch, and roll) in an interactive plot. This package also provides deployment mn200312-58 directly for use in R (`mn200312_58`).
50+
Examine PRH variables (e.g. depth, pitch, and roll) in an interactive plot with view_cats(). This package also provides deployment mn200312-58 directly for use in R.
5151

5252
```{r plot, eval=FALSE}
5353
view_cats(mn200312_58, c("p", "pitch", "roll"))
@@ -68,3 +68,16 @@ view_cats_3d(mn200312_58)
6868
```
6969
![3d movement trajectory of a whale](man/figures/README-plot_3d-1.gif)
7070

71+
## Troubleshooting
72+
73+
*All platforms:*
74+
75+
If you encounter an error installing catsr (or devtools), close all instances of R (including RStudio). Start a new session and run the install command again.
76+
77+
*Windows:*
78+
79+
Installing devtools on R>=4.0.0 requires [Rtools40](https://cran.r-project.org/bin/windows/Rtools/).
80+
81+
*Mac OSX:*
82+
83+
Installing devtools on Mac OSX requires Command Line Tools. In your terminal, run `xcode-select --install`.

README.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,30 @@ catsr\_readme
1111
[![codecov](https://codecov.io/gh/FlukeAndFeather/catsr/branch/master/graph/badge.svg?token=006B4PEFI0)](https://codecov.io/gh/FlukeAndFeather/catsr)
1212
<!-- badges: end -->
1313

14-
catsr reads and visualizes CATS PRH files.
14+
catsr is an R package for reading and visualizing CATS PRH files. For
15+
information on the PRH creation tools and workflow, see
16+
[CATS-Methods-Materials](https://github.com/wgough/CATS-Methods-Materials)
17+
and the [CATS Data Processing
18+
Workshop](https://catsworkshop.sites.stanford.edu/).
1519

1620
## Installation
1721

18-
You can install catsr from [GitHub](https://github.com/) with:
22+
catsr is available on [GitHub](https://github.com/) and you can install
23+
it using devtools package. If you don’t have devtools installed,
24+
uncomment the line below. See section **Troubleshooting** at the end of
25+
this document for common errors.
1926

2027
``` r
2128
# install.packages("devtools")
2229
devtools::install_github("FlukeAndFeather/catsr")
2330
```
2431

25-
On Windows you might encounter
26-
`Error: Failed to install 'catsr' from GitHub: (converted from warning) cannot remove prior installation of package '___'`.
27-
The usual solution is: close all instances of R (including RStudio),
28-
start a new session, and try again.
29-
3032
## Reading data
3133

32-
Read a CATS PRH file in NetCDF format. The .nc file for deployment
33-
mn200312-58 is included in the package.
34+
Read a CATS PRH file in netCDF format with read\_nc(). The .nc file for
35+
deployment mn200312-58 is included in the package. Note: triaxial
36+
variables (aw, mw, gw) are stored as three-column matrices, so only the
37+
first column (corresponding to the x-axis) shows up in View().
3438

3539
``` r
3640
library(catsr)
@@ -58,8 +62,8 @@ mn200312_58_from_nc
5862
## Visualizing data
5963

6064
Examine PRH variables (e.g. depth, pitch, and roll) in an interactive
61-
plot. This package also provides deployment mn200312-58 directly for use
62-
in R (`mn200312_58`).
65+
plot with view\_cats(). This package also provides deployment
66+
mn200312-58 directly for use in R.
6367

6468
``` r
6569
view_cats(mn200312_58, c("p", "pitch", "roll"))
@@ -84,3 +88,21 @@ view_cats_3d(mn200312_58)
8488
```
8589

8690
![3d movement trajectory of a whale](man/figures/README-plot_3d-1.gif)
91+
92+
## Troubleshooting
93+
94+
*All platforms:*
95+
96+
If you encounter an error installing catsr (or devtools), close all
97+
instances of R (including RStudio). Start a new session and run the
98+
install command again.
99+
100+
*Windows:*
101+
102+
Installing devtools on R&gt;=4.0.0 requires
103+
[Rtools40](https://cran.r-project.org/bin/windows/Rtools/).
104+
105+
*Mac OSX:*
106+
107+
Installing devtools on Mac OSX requires Command Line Tools. In your
108+
terminal, run `xcode-select --install`.

man/read_nc.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)