<commit_before># R wrapper for ForecastThis models

## Installation
1. Download [the latest R wrapper release](https://github.com/jacek-rzrz/ForecastThisModels/releases/download/1.0.0/ForecastThisModels-R-1.0.0.tar.gz)
2. Install the wrapper package by executing `R CMD INSTALL ForecastThisModels-R-1.0.0.tar.gz` in your terminal or open Rstudio and click `Tools -> Install Packages...`, select `Install from: Package Archive File (.tar.gz)` and point to the downloaded file.

## System requirements
1. R (>= 3.0.0)
2. Java Runtime Environment (>= 8)

## Troubleshooting
1. Predictions fail with `Unsupported major.minor version 52.0`
This means R is using a JRE/JDK version older than 8. Make sure Java 8 is installed on you machine and reconfigure R by executing this command: `R CMD javareconf`

## Quickstart
Assuming that you have downloaed model.jar and you would like to make predictions for data from data.csv, this R code should get you started:
```
require(ForecastThis)

data <- read.csv('data.csv', stringsAsFactors=F, sep=",")
model <- 'model.jar'
predictions <- predict(data, model)
```
Note: you may need to tweak `read.csv` arguments to help R parse your data correctly!

Explore more inside Rstudio: `??ForecastThis`<commit_msg>Updated the link to the latest R package release<commit_after># R wrapper for ForecastThis models

## Installation
1. Download [the latest R wrapper release](https://github.com/ForecastThis/ModelWrappers/releases/download/1.0.0/ForecastThisModels-R-1.0.0.tar.gz)
2. Install the wrapper package by executing `R CMD INSTALL ForecastThisModels-R-1.0.0.tar.gz` in your terminal or open Rstudio and click `Tools -> Install Packages...`, select `Install from: Package Archive File (.tar.gz)` and point to the downloaded file.

## System requirements
1. R (>= 3.0.0)
2. Java Runtime Environment (>= 8)

## Troubleshooting
1. Predictions fail with `Unsupported major.minor version 52.0`
This means R is using a JRE/JDK version older than 8. Make sure Java 8 is installed on you machine and reconfigure R by executing this command: `R CMD javareconf`

## Quickstart
Assuming that you have downloaed model.jar and you would like to make predictions for data from data.csv, this R code should get you started:
```
require(ForecastThis)

data <- read.csv('data.csv', stringsAsFactors=F, sep=",")
model <- 'model.jar'
predictions <- predict(data, model)
```
Note: you may need to tweak `read.csv` arguments to help R parse your data correctly!

Explore more inside Rstudio: `??ForecastThis`
{'fraction_non_alphanumeric': 0.10269627279936558, 'fraction_numerical': 0.01823949246629659, 'mean_word_length': 4.6066666666666665, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7093878', 'n_tokens_mistral': 803, 'n_tokens_neox': 752, 'n_words': 313}