roogledocs

Collaborative editing of Google Docs with R scripting

https://github.com/terminological/roogledocs

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.6%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

Collaborative editing of Google Docs with R scripting

Basic Info
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 6
Created about 4 years ago · Last pushed about 2 years ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

roogledocs: Embed Analysis in Google Docs

R-CMD-check DOI roogledocs status badge <!-- badges: end -->

ROOGLEDOCS IS IN BETA TEST.

I CAN ADD UP TO 100 USERS BEFORE I HAVE TO SUBMIT FOR GOOGLE'S REVIEW. PLEASE HEAD TO THE BETA TEST DISCUSSION WITH YOUR GMAIL ADDRESS IF YOU WANT TO PARTICIPATE.

R library to perform limited interactions with Google docs and slides in R via the Java API library. The purpose being to support Google docs as a platform for interactive development and documentation of data analysis in R for scientific publication, although it is not limited to this purpose. The workflow supported is a parallel documentation and analysis where a team of people are working collaboratively on documentation, whilst at the same time analysis is being performed and results updated repeatedly as a result of new data. In this environment updating numeric results, tabular data and figures in word documents manually becomes annoying. With roogledocs you can automate this a bit like a RMarkdown document, but with the added benefit that the content can be updated independently of the analysis, by the wider team.

Installation instructions

roogledocs is not on CRAN and probably will never be as the Java libraries that it uses are bigger than CRAN's stringent policies. Instead we have a R-universe repository.

roogledocs depends on rJava which in turn depends on having a working Java installation. I recommend installing both those first. The following commands can help you determine if your rJava installation is working:

R install.packages("rJava") rJava::.jinit() rJava::J("java.lang.System")$getProperty("java.version")

Once rJava is working, stable releases of roogledocs can be installed with the following:

```R

Enable repository from terminological

options(repos = c( terminological = 'https://terminological.r-universe.dev', CRAN = 'https://cloud.r-project.org'))

Download and install roogledocs in R

install.packages('roogledocs') ```

Alternatively unstable development branches can be found here:

```R

the --no-multiarch option is required on windows.

devtools::installgithub("terminological/roogledocs", buildopts = c("--no-multiarch")) ```

R library documentation

The R package site is here

Simple usage

```R

These options control whether roogledocs is disabled globally (useful for testing)

and where it stores the Google Drive authentication tokens

options('roogledocs.disabled'=FALSE) options("roogledocs.tokenDirectory"="~/.roogledocs")

paper = roogledocs::docbyname("my-new-nature-paper") paper$updateFigure("/full/path/to/figure-1.png", figureIndex = 1, dpi = 300) ```

Which will authenticate you, create a blank document (or retrieve it if it exists) and updates the first figure in the document, or inserts it at the end if no images exist already.

After some editing of the document and further analysis you are ready for a new version of the figure:

{R} paper$updateFigure("/full/path/to/figure-1-v2.png", figureIndex = 1, dpi = 300)

Which updates the figure leaving the rest of the Google doc content in place. Clearly this can be combined with ggplot to produce a seamless scripted data pipeline, one output of which is a Google doc. This can be executed in RMarkdown, in which case the markdown can be a notebook documenting the code and methodology, and the Google doc is the write up.

Legal stuff

As we interact with the Google Docs api we are required to have the following policies and terms of service. By using the library you agree to these:

Owner

  • Name: terminological
  • Login: terminological
  • Kind: organization
  • Email: rob@terminological.co.uk

Health informatics and data analytics

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Challen"
  given-names: "Robert"
  orcid: "https://orcid.org/0000-0002-5504-7768"
title: "roogledocs: R Wrapper For Googledocs Java Library"
version: 0.2.0
doi: 10.5281/zenodo.6576096
date-released: 2022-01-01
url: "https://github.com/terminological/roogledocs"

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Dependencies

DESCRIPTION cran
  • R6 * imports
  • fs * imports
  • huxtable * imports
  • magrittr * imports
  • rJava * imports
  • rappdirs * imports
  • tidyverse * imports
  • utils * imports
  • here * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat * suggests
java/pom.xml maven
  • com.google.api-client:google-api-client 1.33.0
  • com.google.apis:google-api-services-docs v1-rev20210707-1.32.1
  • com.google.apis:google-api-services-drive v3-rev20211107-1.32.1
  • com.google.oauth-client:google-oauth-client-jetty 1.32.1
  • io.github.terminological:r6-generator-runtime 0.5.1
  • org.apache.commons:commons-lang3 3.9
  • org.junit.jupiter:junit-jupiter-api 5.4.0 test
  • org.junit.jupiter:junit-jupiter-engine 5.4.0 test
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • actions/setup-java v3 composite
  • actions/upload-artifact main composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
  • timheuer/base64-to-file v1.1 composite