You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/).
25
25
26
26
## Installation
27
27
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.
29
29
30
30
```r
31
31
# install.packages("devtools")
32
32
devtools::install_github("FlukeAndFeather/catsr")
33
33
```
34
34
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
+
36
36
37
37
## Reading data
38
38
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().
40
40
41
41
```{r read}
42
42
library(catsr)
@@ -47,7 +47,7 @@ mn200312_58_from_nc
47
47
48
48
## Visualizing data
49
49
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.
51
51
52
52
```{r plot, eval=FALSE}
53
53
view_cats(mn200312_58, c("p", "pitch", "roll"))
@@ -68,3 +68,16 @@ view_cats_3d(mn200312_58)
68
68
```
69
69

70
70
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`.
0 commit comments