<commit_before>---
- name: Check if RStudio is installed.
  shell: rstudio-server version | grep {{ rstudio_version }}
  register: rstudio_installed
  ignore_errors: true

- name: Download 32-bit RStudio.
  get_url: url=http://download2.rstudio.org/rstudio-server-{{ rstudio_version }}-i386.deb
           dest=/tmp/rstudio-{{ rstudio_version }}.deb
  when: rstudio_installed|failed and ansible_architecture == "i386"

- name: Download 64-bit RStudio.
  get_url: url=http://download2.rstudio.org/rstudio-server-{{ rstudio_version }}-amd64.deb
           dest=/tmp/rstudio-{{ rstudio_version }}.deb
  when: rstudio_installed|failed and ansible_architecture == "x86_64"

- name: Install RStudio.
  apt: deb=/tmp/rstudio-{{ rstudio_version }}.deb
  when: rstudio_installed|failed 

- name: Clean up the RStudio package.
  file: path=/tmp/rstudio-{{ rstudio_version }}.deb state=absent

- name: Create the RStudio configuration directory.
  file: path=/home/{{ interactive_user }}/.rstudio/monitored/user-settings state=directory<commit_msg>Add dependencies for R's devtools.<commit_after>---
- name: Check if RStudio is installed.
  shell: rstudio-server version | grep {{ rstudio_version }}
  register: rstudio_installed
  ignore_errors: true

- name: Install RStudio's prerequisites.
  apt: pkg={{ item }} state=installed
  with_items:
    - libapparmor1
    - libcurl4-gnutls-dev

- name: Download 32-bit RStudio.
  get_url: url=http://download2.rstudio.org/rstudio-server-{{ rstudio_version }}-i386.deb
           dest=/tmp/rstudio-{{ rstudio_version }}.deb
  when: rstudio_installed|failed and ansible_architecture == "i386"

- name: Download 64-bit RStudio.
  get_url: url=http://download2.rstudio.org/rstudio-server-{{ rstudio_version }}-amd64.deb
           dest=/tmp/rstudio-{{ rstudio_version }}.deb
  when: rstudio_installed|failed and ansible_architecture == "x86_64"

- name: Install RStudio.
  apt: deb=/tmp/rstudio-{{ rstudio_version }}.deb
  when: rstudio_installed|failed

- name: Clean up the RStudio package.
  file: path=/tmp/rstudio-{{ rstudio_version }}.deb state=absent

- name: Create the RStudio configuration directory.
  file: path=/home/{{ interactive_user }}/.rstudio/monitored/user-settings state=directory
{'fraction_non_alphanumeric': 0.12807881773399016, 'fraction_numerical': 0.01701746529332736, 'mean_word_length': 4.135632183908046, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4866308', 'n_tokens_mistral': 847, 'n_tokens_neox': 764, 'n_words': 172}