tazovsky / cachemer Goto Github PK
View Code? Open in Web Editor NEWConvenient way of caching objects in R
Convenient way of caching objects in R
Add summary/print method to print cached data. Use data.table
or maybe tibble
.
Fix error:
Błąd w poleceniu 'names(qte.list) <- names(res)':
atrybut 'names' [3] musi mieć tę samą długość co wektor [2]
Code to reproduce error:
dir.create(tmp.dir <- tempfile())
config.file <- file.path(tmp.dir, "config.yaml")
cache <- cachemer$new(path = config.file)
testFun <- function(a, b) {
(a+b) ^ (a*b)
}
cache$setLogger(TRUE)
result1 %c-% testFun(2, 3)
Doesn't work:
vec.arg <- 1:100
list.arg <- list(d = 2, e = 3)
res %c-% testFun(a = vec.arg, 1, list.arg)
as.character(target)[1]
is not good for parsing variable name to string because it causes assignement to $
:
Browse[3]> target
state$active_covariates
Browse[3]> as.character(target)[1]
[1] "$"
Create pipe to cache LHS:
res <- a %>% sin %>% sum %c% .
- in this case LHS is a %>% sin %>% sum
Add readme containing:
future
to save cache in background and do not block codeCreate method to get cached object by:
%in%
, <=
, >=
?)HINT: Create data.table
object from cached objects to filter fast and easy.
fst
R package seems to be faster than data.table
or feather
: http://www.fstpackage.org/ - maybe it's worth considering to use it to save cache?
Collect statistics about the use of functions, arguments, parent functions, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.