Giter Site home page Giter Site logo

plugin-r's Introduction

.github/workflows/ant.yml

Funz plugin: R

This plugin is dedicated to launch R calculations from Funz. It supports the following syntax and features:

  • Input

    • file type supported: *.R, any other format for resources
    • parameter syntax:
      • variable syntax: ?[...]
      • formula syntax: !{...}
      • comment char: #
    • example input file:
      branin <- function(x) {
      x1 <- x[1]*15-5   
      x2 <- x[2]*15     
      (x2 - 5/(4*pi^2)*(x1^2) + 5/pi*x1 - 6)^2 + 10*(1 - 1/(8*pi))*cos(x1) + 10
      }
      
      cat('z=',branin(c(?[x1~[1,2]],!{?x2 + 1.23 | #.###})),"\n")
      
      • will identify input:
        • x1, expected to vary inside [1,2]
        • x2, expected to vary inside [0,1] (by default)
      • replace !{?x2 + 1.23 | #.###} expression by its evaluation
  • Output

    • file type supported: *.Rout
    • read any named value printed with '=', like cat('z=',1.234,"\n")
    • example output file:
      > branin <- function(x) {
      + 	x1 <- x[1]*15-5   
      + 	x2 <- x[2]*15     
      + 	(x2 - 5/(4*pi^2)*(x1^2) + 5/pi*x1 - 6)^2 + 10*(1 - 1/(8*pi))*cos(x1) + 10
      + }
      > 
      > cat('z=',branin(c( 0.5 , 0.132 )),"\n")
      z= 3.000715 
      > 
      > 
      > proc.time()
      utilisateur     système      écoulé 
            0.152       0.013       0.152
      
      • will return output:
        • z=3.000715

Analytics

plugin-r's People

Contributors

yannrichet avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.