r memoise google datastore示例

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了r memoise google datastore示例相关的知识,希望对你有一定的参考价值。

library(memoise)

# fib() generates the nth element of the fibonnaci seqeuence
fib <- function(n) {
  if (n < 2) return(1)
  fib(n - 2) + fib(n - 1)
}

# Define a cache
ds <- cache_datastore(project = "your-project-name", cache_name = "rcache2")

# Memoize fib
mem_fib <- memoise(fib, cache = ds)

mem_fib(30) # Initial run caches the value

以上是关于r memoise google datastore示例的主要内容,如果未能解决你的问题,请参考以下文章

App Engine 上 Cloud Datastore 的客户端库 - NDB 或 google-cloud-datastore

Google Cloud Datastore Emulator 如何验证我们的 datastore-index.xml?

无法连接到本地 Google Cloud Datastore 模拟器

Google Cloud Datastore 客户端库创建实体

探索Google App Engine背后的奥秘- Datastore的设计

在 Google Cloud Datastore 上使用动态类型