<commit_before>#!/bin/bash

# Install development version of R package
FWDIR="$(cd `dirname $0`; pwd)"

# Copy jar files to package's inst/java directory
SCALA_VERSION="2.10"
SPARK_VERSION="0.9"
TARGET_DIR="$FWDIR/../spark/target/scala-$SCALA_VERSION"

if [ ! -f "$TARGET_DIR/ddf_spark_$SCALA_VERSION-$SPARK_VERSION.jar" ]; then
  echo "You must build DDF's Java core and spark package firstly" 
  echo "Guide: Go to $(cd $FWDIR/../; pwd) and run this command"
  echo "mvn package install [-DskipTests]"
  exit -1
fi

rm -r package/inst/java/* || mkdir package/inst/java
cp $TARGET_DIR/ddf_spark_$SCALA_VERSION-$SPARK_VERSION.jar package/inst/java/
cp $TARGET_DIR/lib/*.jar package/inst/java/

# Install R
R CMD INSTALL package/<commit_msg>set JAVA_HOME  and LB_LIBRARY_PATH before installing ddf package<commit_after>#!/bin/bash

# Install development version of R package
FWDIR="$(cd `dirname $0`; pwd)"

# Copy jar files to package's inst/java directory
SCALA_VERSION="2.10"
SPARK_VERSION="0.9"
TARGET_DIR="$FWDIR/../spark/target/scala-$SCALA_VERSION"

if [ ! -f "$TARGET_DIR/ddf_spark_$SCALA_VERSION-$SPARK_VERSION.jar" ]; then
  echo "You must build DDF's Java core and spark package firstly" 
  echo "Guide: Go to $(cd $FWDIR/../; pwd) and run this command"
  echo "mvn package install [-DskipTests]"
  exit -1
fi

rm -r package/inst/java/* || mkdir package/inst/java
cp $TARGET_DIR/ddf_spark_$SCALA_VERSION-$SPARK_VERSION.jar package/inst/java/
cp $TARGET_DIR/lib/*.jar package/inst/java/

# Install R
export JAVA_HOME=${JAVA_HOME:-`readlink -f /usr/bin/javac | sed "s:/bin/javac::"`}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JAVA_HOME}/jre/lib/amd64/server
R CMD INSTALL package/
{'fraction_non_alphanumeric': 0.13981042654028436, 'fraction_numerical': 0.009478672985781991, 'mean_word_length': 4.725423728813559, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1243197', 'n_tokens_mistral': 657, 'n_tokens_neox': 614, 'n_words': 158}