Skip to content

nfultz/static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

static

Static local variables are initialized once, and then their values are saved for future use.

Installation

You can install the development version of static like so:

remotes::install_github("nfultz/static")

Ye Olde Fibonacci Example

library(static)
fib <- function() {
  
  static(x=1)
  static(y=0)
  static(z=NA)
  z <- x + y 
  x <- y
  y <- z
  
  z
}

About

static local variables for R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors