Running R and packages on GCP cloud function : <p>I have been using AWS Lambda to execute some R code by packaging the dependencies (CRAN Packages) and deploying it along with AWS Lambda.
This helps me parrallelise running a small chunk of R code over huge set of data compared to running it on an instance.
I have referred to this article <a href="https://aws.amazon.com/blogs/compute/analyzing-genomics-data-at-scale-using-r-aws-lambda-and-amazon-api-gateway/" rel="noreferrer">GENOMICS ON AWS LAMBDA</a>
The Lambda executes using RPY2 on Python.</p>

<p>I am exploring possibility of running the R code on Google Cloud Functions as I am using Big Query for querying some data.</p>

<p>I see that Google Cloud Functions now supports only NodeJS. There are few ways to execute R script from NodeJS.
<a href="https://www.npmjs.com/package/r-script" rel="noreferrer">NPM</a>
<a href="https://stackoverflow.com/questions/17665565/is-there-a-way-to-run-r-code-from-javascript">Stackoverflow</a></p>

<p>But I need to package all the necessary packages to run my R code also. On AWS I did it by using a AWS AMI to install all R packages then create a Zip which would get deployed.</p>

<p>I wonder if someone has tried running R code with packages on Google Cloud functions.</p>
