Blogs

Checklist for R package (re-)submissions on CRAN

Last update: 2020/01/10 The following is a checklist of things to consider or do before (re-)submitting a package to CRAN, which I find every now and then helpful when I have go through this progress again. With the release of devtools 2.0 things have also changed a bit from the description provided in the R packages book by Hadley Wickham. So this checklist might be also helpful for you.

Continue reading

Example code for an Integrated Trend Analysis (ITA)

I wrote the following R Code for an Integrated Trend Analysis (ITA) during my PhD thesis in 2010, when I attended for the first time the annual meeting of the ICES/HELCOM Working Group on Integrated Assessments of the Baltic Sea (WGIAB). The code helped running a cross-comparison of several Baltic Sea sub-systems (see the 2010 report1). Together with Rabea Diekmann we fine-tuned the code and published it along with a full description on ITA methods in a Book chapter2 in Climate Impacts on the Baltic Sea: From Science to Policy.

Continue reading

Comparison of change point detection methods

This post compares a few change point detection method available in R given different time series dynamics and research questions. Change points or breakpoints are abrupt variations in time series data and may represent transitions between different states. The detection of change points is useful in modelling and prediction of time series and is found in application areas such as medical condition monitoring, speech and image analysis or climate change detection.

Continue reading

Run Shiny Server on your own DigitalOcean droplet - Part 1

Do you also like shiny apps and would like to host more than 5 apps as currently permitted at shinyapps.io? Than the solution might be to run your own shiny server using any (virtual) server. In the following I will describe step-by-step how I set up my own Shiny as well as Rstudio Server using Digital Ocean. At the university I already use Rstudio Server extensively in my stats courses, which runs on a physical server at my research institute.

Continue reading

Run Shiny Server on your own DigitalOcean droplet - Part 2

This 2nd part will cover the installation of R, RStudio and the Shiny Server and is based on R’s Ubuntu packages for R tutorial, the DigitalOcean manual, RStudio’s RStudio Server and Shiny Server guides, and Dean Attali’s great blog post. Table of Contents - Part 2 Step 8: Some preparations Step 9: Install R and packages 9.1 R 9.2 R Packages Step 10: Install RStudio Server Step 11: Install and configure Shiny Server 11.

Continue reading

Linking 2 computers to 2 GitHub accounts

If you have only one GitHub account and work with a single computer you will find plenty of information in the internet on how to link your machine to your account. Also, if you want to set up a secure SSH protocol to connect your computer to GitHub so that you don’t have to supply your username or password at each visit, a good starting point is the Connecting to GitHub with SSH documentation on the GitHub help pages or take a look at some of the many blogs, e.

Continue reading

Helpful Shiny apps

Last updated: May 01, 2019 If you are an R user but don’t know yet what Shiny and Shiny apps are, you definitely should read up on it on https://shiny.rstudio.com. But in a nutshell, Shiny is an R package that builds interactive web apps straight from R. You just need to write an R script that follows a specific Shiny syntax and once you run the script, the package builds a HTML file as user interface (UI) with interactive input elements (based on Javascript) that trigger certain computations in R.

Continue reading

oce package for oceanographical data

In this post I will present the oce package, which can be handy for marine data scientist working with oceanographical data. oce provides lots of functions to read oceanographic data, process the data specific to the measuring instrument, and visualize results following oceanographic conventions (using the base graphics). The key function for importing data into R is ?read.oce(), which automatically recognizes the file type. If the recognition does not work, try the individual functions (e.

Continue reading

How to normalize the RMSE

This post has been stimulated by a discussion with a colleague who asked about the normalization method for the root mean square error (NRMSE) in the INDperform R package, which is based on the indicator testing framework outlined in my article (Otto et al. 2018)1. At the time of writing the article and package I simply used a common approach and didn’t test it much further. But sparked by this discussion I started to test it thoroughly (as you will see below), which will make me revise the package.

Continue reading

Release indicator package INDperform

INDperform Overview INDperform is an R package that implements a quantitative framework for selecting and validating the performance of state indicators tailored to meet regional conditions and specific management needs as described in Otto et al. (2018) 1 (see also my post on indicators). The package builds upon the tidy data principles and offers functions to identify temporal indicator changes, model relationships to pressures while taking non-linear responses and temporal autocorrelation into account, and to quantify the robustness of these models.

Continue reading