################### START ###############################
options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/cloud-platform")
# load the libraries
library("googleAuthR", lib.loc="/home/user/packages" )
library("googleCloudStorageR", lib.loc="/home/user/packages")
gar_gce_auth()
name <- c("john","doe")
id <- c(1,2)
results = as.data.frame(cbind(name,id))
print("writing results to GCS")
# Set bucket name
bucket <- "my-bucket"
gcs_global_bucket(bucket)
print("bucket set.")
# Upload that file to the global bucket
gcs_upload(file = results , name = "results.csv")
################## END ################################