This is a javascript indentation script for the statistical language R. This script is for all software using KTextEditor (e.g. Kate), but more specifically for RKWard, which is an IDE for R.
I tested it for corner cases for some time so it should be quite robust, although my ability to find corner cases alone is obviously limited by a lack of diversity in coding styles.