To cite the theory behind marine heat waves and the underlying algorithm, please cite Hobday et al. (2016). To cite the RmarineHeatWaves package, the reference is Smit et al. (2018). Details follow:

Hobday, A. J., Alexander, L. V., Perkins, S. E., Smale, D. A., Straub, S. C., Oliver, E. C. J., et al. (2016) A hierarchical approach to defining marine heatwaves. Progress in Oceanography, 141(C), 227--238

Smit, A. J. et al. (2018) RmarineHeatWaves: Package for the calculation of marine heat waves Version 0.16.1 University of the Western Cape, Bellville, Cape Town, South Africa. https://github.com/ajsmit/RmarineHeatWaves

As RmarineHeatWaves is continually evolving, you may want to cite its version number. Find it with 'help(package=RmarineHeatWaves)'. If you do not want to cite the R package, at the very least cite Hobday et al. (2016). It would be nice if both were cited, however!

Corresponding BibTeX entries:

  @Article{,
    author = {Alistair J. Hobday and Lisa V. Alexander and Sarah E.
      Perkins and Dan A. Smale and Sandra C. Straub and Eric C.J.
      Oliver and Jessica A. Benthuysen and Michael T. Burrows and
      Markus G. Donat and Ming Feng and Neil J. Holbrook and Pippa J.
      Moore and Hillary A. Scannell and Alex Sen Gupta and Thomas
      Wernberg},
    title = {A hierarchical approach to defining marine heatwaves.},
    journal = {Progress in Oceanography},
    year = {2016},
    volume = {141},
    pages = {227--238},
  }
  @Manual{,
    title = {{RmarineHeatWaves}: {P}ackage for the calculation of
      marine heat waves},
    author = {{Albertus J. Smit} and {Eric C. J. Oliver} and {Robert W.
      Schlegel}},
    organization = {University of the Western Cape},
    address = {Bellville, Cape Town, South Africa},
    note = {R package version 0.17.0},
    year = {2018},
    url = {https://github.com/ajsmit/RmarineHeatWaves},
  }