ebook img

Oceanographic Analysis with R PDF

303 Pages·2018·7.828 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Oceanographic Analysis with R

Dan E. Kelley Oceanographic Analysis with R Oceanographic Analysis with R Dan E. Kelley Oceanographic Analysis with R 123 DanE.Kelley Oceanography DalhousieUniversity Halifax,NS,Canada ISBN978-1-4939-8842-6 ISBN978-1-4939-8844-0 (eBook) https://doi.org/10.1007/978-1-4939-8844-0 LibraryofCongressControlNumber:2018959244 ©SpringerScience+BusinessMedia,LLC,partofSpringerNature2018 Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpartof thematerialisconcerned,specificallytherightsoftranslation,reprinting,reuseofillustrations,recitation, broadcasting,reproductiononmicrofilmsorinanyotherphysicalway,andtransmissionorinformation storageandretrieval,electronicadaptation,computersoftware,orbysimilarordissimilarmethodology nowknownorhereafterdeveloped. Theuseofgeneraldescriptivenames,registerednames,trademarks,servicemarks,etc.inthispublication doesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevant protectivelawsandregulationsandthereforefreeforgeneraluse. Thepublisher,theauthors,andtheeditorsaresafetoassumethattheadviceandinformationinthisbook arebelievedtobetrueandaccurateatthedateofpublication.Neitherthepublishernortheauthorsor theeditorsgiveawarranty,expressorimplied,withrespecttothematerialcontainedhereinorforany errorsoromissionsthatmayhavebeenmade.Thepublisherremainsneutralwithregardtojurisdictional claimsinpublishedmapsandinstitutionalaffiliations. ThisSpringerimprintispublishedbytheregisteredcompanySpringerScience+BusinessMedia,LLC, partofSpringerNature. Theregisteredcompanyaddressis:233SpringStreet,NewYork,NY10013,U.S.A. ForMumandDad. Preface e s erti p x e c hi p a gr o n a e c O R expertise I wrote this book with three types of reader in mind. Type A consists mainly of experienced oceanographers1 who want to add R to their list of tools for data analysis.TheyshouldexpecttolearnhowRcansimplifyandenergizetheirresearch programmes. In type B are technicians, consultants and others who may be called upon to solve new problems without sufficient time to study the literature or to implementcleanalgorithms.SinceRprovidesawiderangeofwell-vettedsolutions that are tied closely to the literature, readers of type B (and their employers) can lookforwardtoanincreaseinproductivityandareductioninstress.Finally,typeC comprises students who are entering oceanography, equipped with R skills gained during previous studies.Ihope they willseehow tousetheirskillstocompetitive advantageduringthetransitiontooceanography. Taken together, these three types make up the core of any department of oceanography, spanning ages, skills and interests. Given their varied backgrounds and ambitions, they may have different reasons to read this book, and so it is organizedwiththisinmind. 1Limnologistsshouldalsofindthebookuseful,sincemanyinstrumentsandmethodsareshared betweenthefields.However,itistiresometoread“oceanographyandlimnology”repeatedly,and OARisapleasinglynauticalabbreviationforthebooktitle. vii viii Preface Chapter1putsRinthecontextofothertoolsusedinoceanography,aspartofan argumentthatnowisagoodtimeforoceanographerstotryR.Althoughthischapter isintendedmainlyforreadersoftypesAandB,whotendtobeaccustomedtoold toolsandwaryofnewones,readersoftypeCmayfinditusefulforsettingthescene. Chapter2providesanRtutorialthatisframedinoceanographicexamples.This should be examined closely by readers of types A and B, who will need to learn R syntax. Readers of type C might choose to skim this chapter, with an eye to the peculiaritiesofoceanographicdata. Chapter3presentsasketchoftheocepackage.Sinceitwasdevelopedduring the evolution of a research programme, oce is a very practical thing. It provides functions for a wide range of oceanographic computations, for reading dozens of instrument-specific oceanographic data formats, and for producing graphics that obeyoceanographicconventions(KelleyandRichards2018).Itsobjectorientation scheme lets analysts work at a high level of abstraction, without losing the ability to probe lower levels when appropriate. Although there are excellent tools for individual tasks in other computing languages, few match oce as a coherent framework.Also,andveryimportantly,thedecisiontouseRmeansthatusershave accesstothousandsofpackagesforstatisticalandotheroperations,yieldingcutting- edgemethodologieswithouttheburdenofextensivecoding. Chapter4containsexplanations ofhowRmightbeusedinreal-worldapplica- tions. Here, the steps of the analysis are explained in detail, from start to finish. Drawn from the classic oceanographic literature, the applications sample the four sub-disciplines of oceanography: chemical, biological, geological and physical. While practical-minded readers might focus on the R code, I hope that any reader with an interest in oceanography will welcome the chance to explore data put forward by the likes of Alfred Redfield, Gordon Riley, Tuzo Wilson and Walter Munk. Chapter5continuestheappliedtheme,butwithlessdepthandmorebreadth.A miscellanyofmethods,thischapterislikelytobeconsultedasectionatatime,as needs arise. Readers of type C should note that oceanography has yet to develop standardoperatingprocedures,andsothischapterismoreasuggestiveguidebook thanadetailedmap. Chapter 6 provides solutions to the many exercises that pepper the text. This is a key element of the book, because working on exercises is a sure way to build skill.Littleisgainedbypassivereading... nobodyeverlearnedtoplayaviolinby watchingsomeoneelseplayone. Appendix A contains advice to readers who are switching to R from Matlab. Appendix B has an outline of popular GUI systems that simplify the use of R, withoutlimitingitspower.AppendixCholdsadiscussionofmapprojectionsinthe oce package, while Appendix D explains how oce lets analysts switch between theUNESCOandGSWformulationsofseawaterproperties.Afewaspectsofhigh- performancecalculationsinRaresketchedinAppendixE.Finally,inAppendixF, readerswillfindsomeremarksonthefutureofR,ingeneraltermsandinthecontext ofoceanographicanalysis. Preface ix Colophon. This book was typeset in LATEX, with R being used for all the diagrams.Thecodeforthediagrams,alongwithallthesamplecode,isembedded inthetextusingSweave(Leisch2002),withRactingasapreprocessorthatcreates output and diagrams prior to typesetting. This setup means that readers can be confidentthatRcodeprovidedinthisbookwillworkasindicated. Acknowledgments ManypeoplehavehelpedmewithR,withthedevelopmentoftheocelibrary,and with the writing of this book. It gives me great pleasure to thank, in alphabetical order: Jakson Alves de Aquino, for writing a powerful and graceful R/Sweave plugin for the Vim text editor; Paul Barker, for helping with GSW test cases; Natacha Bernier, for leading field trips in my physical oceanography class at DalhousieUniversity,includingonethatyieldedadatasetinoce;DanielBourgault, for long-time collaborations; Richard Cheel, for providing advice on dealing with acoustic instruments; Alex Deckmyn, for helping with wind roses in oce; Pierre Flament, for contributing his seawater spiciness code to oce; Peter Galbraith, for being my first PhD student, and a steadfast collaborator ever since; Jenna Hare, for help with French oce plot labels; Alex Hay, for collaborating in SLEIWEX andbeyond;JackieHurst,forhelpingwithtypesettinganddealingwithuniversity administration; Stephanie Kienast, for useful R discussions and for help with German oce plot labels; Anthony Ladson, for helping with tidal analysis inoce; Paul and Sue Logan, for explaining the Rink Ratz® hockey card game; Chantelle Layton, for contributing to oce and for spearheading research relating to Flemish CapandbaroclinictopographicRossbyWaves;ChrisMoore,myDeanatDalhousie University, for suggesting it was reasonable to take the time to write a book; Edward P. Morris, for helping to make oce handle burst-mode velocimeter data; Michelle Paon, for helping me to assemble the citation data for Chap.4; Eric Mills, for providing insights on Gordon Riley and for sharing material from his excellenthistoryofthedevelopmentofoceanographicscience(Mills2009);Ramzi Mirshak,forSLEIWEXcollaborations,includingdeepthinkingonbeamwiseADP calculations, which benefited oce after the fact; Rich Pawlowicz, for sharing Matlabsolutionstoaseeminglyunendingseriesofoceanographicproblems;Clark Richards, for his SLEIWEX collaborations, for his coauthoring of both oce and gsw, for his insightful comments on this book and for his wide-ranging dedication to science and education; Doug Schillinger, for patient explanations of the functioning of acoustics-based instruments; Christopher Taggart, for his open door and tireless intellectual spirit; and Keith Thompson, for advice on statistics, scienceandmoreimportantthings. xi xii Acknowledgments More generally, I am indebted to Dirk Eddelbuettel, Uwe Ligges, Brian Rip- leyandHadleyWickhamfortheirremarkablygenerouscontributionstoRcommu- nity,andthemanyotherswhohavewrittenandmaintainedtheRpackagesonwhich usersrely. Finally, and most importantly, I extend the warmest of thanks to the many students, undergraduate and postgraduate alike, with whom I have had engaging conversations about the place of R in oceanography. I’ve learned a lot from them, andIhopetoreturnthefavourinthepagesthatfollow. Halifax,NS,Canada DanE.Kelley Spring2018

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.