Git Product home page Git Product logo

Comments (6)

daroczig avatar daroczig commented on July 25, 2024

Of course we need it.

About YAML, pls check out this: vubiostat/r-yaml#4

But I am also thinking about an own R helper to generate the yaml (we need to support only lists, which is a piece of cake).

Let us chat about this in the near future.

from rapport.

daroczig avatar daroczig commented on July 25, 2024

I was in the mood to code some new writer (like pander), please see the above referenced commit. Of course this is a really basic yaml writer, but AFAIK we do not require a more robust model ATM. As there are no "UTF-8" issue with yaml::yaml.load, we can use that as a parser. And if the Unicode issue would be resolved, we can even drop my basic writer and use as.yaml as we intended to do - or dropping my quick writer even before that :)

Okay, awaiting feedback. Quick demo:

> cat(toYAML(tpl.info('example')))
meta:
  title: Example template 
  author: Gergely Daróczi 
  desc: This template demonstrates the basic features of rapport. We all hope you will like it! 
  email: ~ 
  packages: [] 
  dataRequired: TRUE 
  example:
  - rapport("example", ius2008, v='age')
  - rapport("example", ius2008, v='gender', pacman=FALSE)
  - rapport("example", ius2008, v='age', s='FOO BAR')
inputs:
- name: v 
  label: Variable 
  type: variable 
  limit:
    min: 1 
    max: 1 
  default: ~ 
  mandatory: TRUE 
  desc: A variable 
- name: pacman 
  label: Pacman 
  type: boolean 
  limit:
    min: 1 
    max: 1 
  default: TRUE 
  mandatory: FALSE 
  desc: Show Pacman in the results? 
- name: s 
  label: A string 
  type: string 
  limit:
    min: 0 
    max: 256 
  default: Bye! 
  mandatory: FALSE 
  desc: Any character value to be printed at the end of theriport 

from rapport.

aL3xa avatar aL3xa commented on July 25, 2024

So based on this commit I'm getting a strange feeling that you want to ditch yaml package.

from rapport.

daroczig avatar daroczig commented on July 25, 2024

Just as I wrote above: we needed something like my custom solution until that Unicode issue is not resolved in yaml package, but I would not want to write a yaml parser too, so I definitely vote on using yaml package - just as before.

from rapport.

aL3xa avatar aL3xa commented on July 25, 2024

Okay, then pushing the changes I made. Will use your code (and BTW thanks for the effort).

from rapport.

aL3xa avatar aL3xa commented on July 25, 2024

Implemented in 17bb099 see ?tpl.renew

from rapport.

Related Issues (20)

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.