<commit_before># arrayfire-r

This repository contains the files required to use ArrayFire from R.

This is a work in progress. Please follow [this issue](https://github.com/arrayfire/arrayfire-r/issues/7) to check on the progress.

## Prerequisites

- Clone and build [ArrayFire](https://github.com/arrayfire/arrayfire)
    - All the pre-requisites for ArrayFire still apply.

- **make**

- **Linux**.
    - **Windows** and **OSX** support coming soon.

## Contents

- **src/**: Contains the cpp source files interfacing with arrayfire
- **R/**: Contains the R source files wrapping the C interface
- **examples/**: contains a few examples demonstrating the usage

## Usage

After you the necessary pre-requisites, edit the following paramets

- Open **src/Makevars** and change **AF_PATH** to the right location
- Change **AFCL** to 1 if you are using OpenCL

### Linux

If you built arrayfire with CUDA support, you may want to run the following command before installing arrayfire package:

```
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/nvvm/lib64
```

- To install the package as root, run the following command from the directory containing of arrayfire-r
    - `sudo R CMD INSTALL arrayfire-r`

- To install the packages for the local user do the following
    - Create `R_libs` in your home directory: `mkdir ~/R_libs`
    - add `export R_LIBS=~/R_libs` to your **.bashrc**
    - You may need to do **source ~/.bashrc** if you are in the same session
    - Run `R CMD INSTALL arrayfire-r` from the directory containing arrayfire-r (`sudo` is not needed)


You can also put this in your `~/.bashrc` so you will not need to run the command again.

You should be good to go now!

## Documentation
- TODO

## License

This repository is distributed under the BSD 3 clause license. Please check the LICENSE file in the root directory for further information.

## Acknowledgements

The ArrayFire library is written by developers at [ArrayFire](http://arrayfire.com) LLC
with [contributions from several individuals](https://github.com/arrayfire/arrayfire_python/graphs/contributors).

The developers at ArrayFire LLC have received partial financial support
from several grants and institutions. Those that wish to receive public
acknowledgement are listed below:

<!--
The following section contains acknowledgements for grant funding. In most
circumstances, the specific phrasing of the text is mandated by the grant
provider. Thus these acknowledgements must remain intact without modification.
-->
<commit_msg>Cleaning up REAMDE.md<commit_after># arrayfire-r

This repository contains the files required to use ArrayFire from R.

This is a work in progress. Please follow [this issue](https://github.com/arrayfire/arrayfire-r/issues/7) to check on the progress.

## Prerequisites

- Get the ArrayFire Library using one of the following methods:
    - [Download ArrayFire binary](http://arrayfire.com/download/)
    - [Build ArrayFire from source](https://github.com/arrayfire/arrayfire)
- **make**
- **Linux**.
    - **Windows** and **OSX** support coming soon.

## Installation

Please note that this project is still a work in progress and as such is not available through CRAN.

You can still build and use this project using the following instructions.

- [Build instructions for Linux](https://github.com/arrayfire/arrayfire-r/wiki/Installation-instructions-for-Linx)

## Documentation
- TODO

## License

This repository is distributed under the BSD 3 clause license. Please check the LICENSE file in the root directory for further information.

## Acknowledgements

The ArrayFire library is written by developers at [ArrayFire](http://arrayfire.com) LLC
with [contributions from several individuals](https://github.com/arrayfire/arrayfire_python/graphs/contributors).

The developers at ArrayFire LLC have received partial financial support
from several grants and institutions. Those that wish to receive public
acknowledgement are listed below:

<!--
The following section contains acknowledgements for grant funding. In most
circumstances, the specific phrasing of the text is mandated by the grant
provider. Thus these acknowledgements must remain intact without modification.
-->

{'fraction_non_alphanumeric': 0.08216575635241036, 'fraction_numerical': 0.0016623129897886488, 'mean_word_length': 4.358778625954199, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '274935', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1085, 'n_words': 511}