Ride version 1.2.1 released

Ride is a full featured, open source, integrated development environment for the Renjin implementation of R for the JVM.

I started developing Ride in the spring of 2018, originally as a way to test R code meant to run in the Renjin ScriptEngine interactively but soon evolved into a full blown IDE.

It supports syntax highlighting, code suggestion, ability to run partial code snippets, maven and git support etc. etc. SQL, Java and Groovy development are also supported.

Ride supports three different themes, bright, dark and blue (seen above)

SQL support is also quite advanced making Ride an excellent tools for data analysis as well as a great way to develop R projects and/or Packages targeted for use in Renjin R. Below is a screenshot (Ride is set to the bright theme):

Ride can be downloaded here: https://github.com/perNyfelt/ride/releases/latest

fx-yearmonth-picker, an open source JavaFx date component released

I just released this javafx component on github under the liberal MIT license.

There are two versions:

  1. YearMonthPickerCombo – a combobox that return a YearMonth.
  2. YearMonthPicker – A custom control that resembles DatePicker where the user can click a calendar and then pick the desired year month.

See test.alipsa.ymp.YearMonthPickerExample for a simple example of both. Here’s an example screenshot:

Both works similar to a combo box i.e. you do getValue() to get the value and setOnAction() to capture a value change e.g.

YearMonthPicker ymp = new YearMonthPicker();
ymp.setOnAction(a -> System.out.println("Default YearMonthPicker, Value picked was " + ymp.getValue()));

There are no external dependencies, and the jar file is about 40kb so nice and small. You can download the jar file from the release section or add the following to your maven file:

<dependency>
  <groupId>se.alipsa</groupId>
  <artifactId>fx-yearmonth-picker</artifactId>
  <version>1.0.2</version>
</dependency>

Below is a screenshot of the YearMonthPicker in action

Spreadsheets – a Renjin package – Released

I released spreadsheets under the MIT license two weeks ago. Spreadsheets is a package (extension) for Renjin (an implementation of R for the Java Virtual Machine). This package will give you the ability to work with (read, write) spreadsheets. It supports reading of excel and Open Office/Libre Office spreadsheets files. The project is located on github.

To import a spreadsheet into a data.frame you just do:

excelDf <- importSpreadsheet(
    filePath = "df.xlsx",
    sheet = 1,
    startRow = 2,
    endRow = 34,
    startColumn = 1,
    endColumn = 11,
    firstRowAsColumnNames = TRUE
)

Similarly to export a data.frame to a spreadsheet (Excel or Open Document) is as simple as:

exportSpreadsheet(filePath, df, sheet)

You can also export several data.frame to a spreadsheet in one go:

exportSpreadsheets(
  filePath = paste0(getwd(), "/dfExport.ods"), 
  dfList = list(mtcars, iris, PlantGrowth), 
  sheetNames = c("cars", "flowers", "plants")
)

In addition there are several nice utility function such as find a row or a column matching a given value, convert between column indexes and names etc.

xmlr released on CRAN

Xmlr is a R packed providing an object oriented approach to XML management for R written in R’s Reference Classes. The project is located at github and available for free under the MIT license. It was accepted by CRAN May 12 2020.

To create the following xml

<table xmlns='http://www.w3.org/TR/html4/'>
    <tr>
        <td>Apples</td>
        <td>Bananas</td>
    </tr>
</table>

You could do something like this:

 doc <- Document$new()
  root <- Element$new("table")
  root$setAttribute("xmlns", "http://www.w3.org/TR/html4/")

  root$addContent(
    Element$new("tr")
      $addContent(Element$new("td")$setText("Apples"))
      $addContent(Element$new("td")$setText("Bananas"))
  )
  doc$setRootElement(root)

Or you could do like this:

doc2 <- parse.xmlstring("
<table xmlns='http://www.w3.org/TR/html4/'>
    <tr>
        <td>Apples</td>
        <td>Bananas</td>
    </tr>
</table>")

SieParser released as Open Source

I just completed the port to Java 1.8 of Johan Idstam’s SIE parser for .NET (https://github.com/idstam/jsisie) and relased version 1.0 on Sonatype. Soure code and issue tracking is available here: https://github.com/perNyfelt/SIEParser. The released artifacts are available on Maven Central at http://search.maven.org/#artifactdetails%7Ccom.github.pernyfelt.sieparser%7CSieParser%7C1.0%7Cjar

This library (released under MIT license) can read an write SIE Accounting files of all types (1-4). I am using it in various financial products that I am working on as well as in my work as a consultant in financial systems in Sweden. Hopefully you will find it useful too!