knitr::opts_chunk$set(echo = TRUE) # options(googleAuthR.verbose = 0) # set when debugging
library(googleAuthR) library(googleCloudVertexAIR) options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/cloud-platform") gar_auth_service(json_file = Sys.getenv("GAR_SERVICE_JSON"))
projectId <- Sys.getenv("GCVA_DEFAULT_PROJECT_ID") gcva_region_set("us-central1") gcva_project_set(projectId)
First, let's set a unique dataset name with a timestamp to avoid confusion:
timestamp <- strftime(Sys.time(), "%Y%m%d%H%M%S") timestamp
datasetDisplayName <- sprintf("california-housing-%s", timestamp) datasetDisplayName
gcva_list_datasets()
dataset <- gcva_create_tabluar_dataset( displayName = datasetDisplayName, gcsSource = "gs://cloud-samples-data/ai-platform-unified/datasets/tabular/california-housing-tabular-regression.csv") dataset
datasets_list <- gcva_list_datasets() datasets_list
gcva_dataset(datasetName = datasets_list[1,2])
gcva_delete_dataset(dataset = dataset)
gcva_list_datasets()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.