ratio <- c( 0.9345, 0.95123, 0.91807, 0.8886, 0.8169, 0.6687)
temperature <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036)
SP <- gsw_SP_salinometer(ratio, temperature)
stopifnot(all.equal(SP,
c(32.431728787558541, 33.085035719966307, 31.800791917322833,
30.692490757036179, 27.979281308696116, 22.474597460508491)))
Run the code above in your browser using DataLab