Skip to content

Commit 8d41d5f

Browse files
committed
update vignette
1 parent d3d6238 commit 8d41d5f

4 files changed

Lines changed: 110 additions & 84 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: gsw
22
Version: 1.0-5
3-
Date: 2017-08-07
3+
Date: 2017-08-08
44
Title: Gibbs Sea Water Functions
55
Authors@R: c(person("Dan", "Kelley", role=c("aut","cre","cph"), email="dan.kelley@dal.ca", comment="C wrapper plus R code, tests, and documentation"), person("Clark", "Richards", role=c("aut","cph"), email="clark.richards@gmail.com", comment="C wrapper plus R code, tests, and documentation"), person("WG127", "SCOR/IAPSO", role=c("aut","cph"), comment="Original 'Matlab' and derived code"))
66
Copyright: Original algorithms and 'Matlab'/C library (c) 2015-2017 WG127 SCOR/IAPSO

inst/doc/gsw.R

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## ----echo=FALSE, results="hide"---------------------------
22
options(keep.source=TRUE, width=60, prompt=' ', continue=' ', oceEOS="unesco")
3-
eval <- TRUE
43

54
## ---------------------------------------------------------
65
library(gsw)
@@ -9,50 +8,50 @@ SA <- gsw_SA_from_SP(SP=35, p=100, longitude=188, latitude=4)
98
## ---------------------------------------------------------
109
CT <- gsw_CT_from_t(SA=SA, t=10, p=100)
1110

12-
## ----eval=eval, echo=FALSE--------------------------------
11+
## ----eval=TRUE, echo=FALSE--------------------------------
1312
png("TS_unesco.png", width=353, height=353, pointsize=12)
1413

15-
## ----eval=eval--------------------------------------------
14+
## ----eval=TRUE--------------------------------------------
1615
library(oce)
1716
data(section)
1817
ctd <- section[["station", 100]]
1918
Slim <- c(34.8, 37.0)
2019
Tlim <- c(0, 25)
2120
plotTS(ctd, Slim=Slim, Tlim=Tlim, eos="unesco")
2221

23-
## ----eval=eval, echo=FALSE--------------------------------
22+
## ----eval=TRUE, echo=FALSE--------------------------------
2423
dev.off()
2524
png("TS_gsw.png", width=353, height=353, pointsize=12)
2625

27-
## ----eval=eval--------------------------------------------
26+
## ----eval=TRUE--------------------------------------------
2827
plotTS(ctd, Slim=Slim, Tlim=Tlim, eos="gsw")
2928

30-
## ----eval=eval, echo=FALSE--------------------------------
29+
## ----eval=TRUE, echo=FALSE--------------------------------
3130
dev.off()
3231
png("TS_gsw.png", width=353, height=353, pointsize=12)
3332

34-
## ----eval=eval, echo=FALSE--------------------------------
33+
## ----eval=TRUE, echo=FALSE--------------------------------
3534
png('temperature_comparison.png', width=353, height=252, pointsize=12)
3635
par(mar=c(3.2, 3, 1, 1/2), mgp=c(2, 0.85, 0))
3736

38-
## ----eval=eval--------------------------------------------
37+
## ----eval=TRUE--------------------------------------------
3938
f <- (section[["CT"]] - section[["theta"]]) / section[["CT"]]
4039
hist(f, main="", xlab="(CT-theta)/CT")
4140

42-
## ----eval=eval, echo=FALSE--------------------------------
41+
## ----eval=TRUE, echo=FALSE--------------------------------
4342
dev.off()
4443
png('salinity_comparison.png', width=353, height=252, pointsize=12)
4544
par(mar=c(3.2, 3, 1, 1/2), mgp=c(2, 0.85, 0))
4645

47-
## ----eval=eval--------------------------------------------
46+
## ----eval=TRUE--------------------------------------------
4847
f <- (section[["SA"]] - section[["salinity"]]) / section[["SA"]]
4948
hist(f, main="", xlab="(SA-SP)/SA")
5049

51-
## ----eval=eval, echo=FALSE--------------------------------
50+
## ----eval=TRUE, echo=FALSE--------------------------------
5251
dev.off()
5352
png("SSS_2.png", width=588, height=336)
5453

55-
## ----eval=eval--------------------------------------------
54+
## ----eval=TRUE--------------------------------------------
5655
library(oce)
5756
data("levitus", package="ocedata")
5857
SSS <- levitus$SSS
@@ -64,7 +63,7 @@ imagep(levitus$longitude, levitus$latitude, per, col=oceColorsJet,
6463
zlim=quantile(per, c(0.001, 0.999), na.rm=TRUE))
6564
title(expression("Percent difference between " * S[A] * " and " * S[P]))
6665

67-
## ----eval=eval, echo=FALSE--------------------------------
66+
## ----eval=TRUE, echo=FALSE--------------------------------
6867
dev.off()
6968

7069
## ----results="hide", echo=FALSE---------------------------

0 commit comments

Comments
 (0)