Git Product home page Git Product logo

Comments (6)

daroczig avatar daroczig commented on June 27, 2024

That's a great idea indeed, thanks @aL3xa!

Just adding my 2 cents: .rapport.R or .rapport.conf might live in user's home dir (both on Unix-like systems and on Windows) and we might add a new line at the end of init.R to check if that files exists. If so, then it's sourced, so default settings would be overwritten. We just need a function to easily alter that file which would hold some options(...) calls.

from rapport.

daroczig avatar daroczig commented on June 27, 2024

Bumping this issue: why not ask users simply to add some tweaks in their .Rprofile instead of custom hacks?

from rapport.

daroczig avatar daroczig commented on June 27, 2024

My recent request fits this ticket, so here goes the "specification": instead of config files, users can tweak their default settings in .Rprofile. That's the R way :)

But we need to tweak the current options setup, which messes with global options and we are definitely cluttering up that. Please change the options to work like in pander package: https://github.com/Rapporter/pander/blob/master/R/options.R

In short: let us have a rapport option which would hold the current options in a list. Pls add a helper function (e.g. rapportOptions) like I did in pander where users can query and update those easily. Do not forget to update all options and getOption calls in the sources and in the docs :)

And a "fallback compatibility" would be awesome for loyal users, so if they have e.g. an rp.file.path option, then the custom rapportOptions fn should return that instead of the default one.

from rapport.

aL3xa avatar aL3xa commented on June 27, 2024

I have a few suggestions about this one:

  • if we move all options to rapport list, we don't need rp. prefix, or do we?
  • IMO, getter/setter approach is way better, e.g. rapportOption('tpl.paths') should return template paths, but rapportOption('tpl.paths') <- c('/my/path1', '/my/path2') would be a bit more elegant

Whadda U think?

from rapport.

daroczig avatar daroczig commented on June 27, 2024

Yeah, we can drop rp prefix.
About setter method: as you wish :)

from rapport.

daroczig avatar daroczig commented on June 27, 2024

rp prefix is gone in #93, and users can specify options in their .Rprofile, so let's say it's fixed

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.