GithubHelp home page GithubHelp logo

Comments (7)

hadley avatar hadley commented on August 28, 2024

Another option from JJ. Like Option 4 + 5: := toggles the standard behaviour:

  • scaled expr: x = ~mpg
  • scaled cnst: x := 1
  • scaled rctv: x := input_slider()
  • unscld expr: fill := ~col
  • unscld cnst: fill = "red"
  • unscld rctv: fill = input_slider()
  • prop obj : y = prop(...)

That way the standard operations (scaled expressions and unscaled constants) just work

from ggvis.

jcheng5 avatar jcheng5 commented on August 28, 2024

Option 1.6

  • scaled expr: x ~ mpg
  • scaled cnst: x ~ I(1)
  • scaled rctv: x ~ input_slider()
  • unscld expr: fill = col
  • unscld cnst: fill = I("red")
  • unscld rctv: fill = input_slider()
  • prop obj : y = prop(...)

I personally really like I() to distinguish between either expr vs. cnst, or scaled vs. unscaled.

from ggvis.

hadley avatar hadley commented on August 28, 2024

@jcheng5 unfortunately that's really hard to make work because of the x ~ input_slider() - how do you tell if the rhs of the formula should be evaluated or unevaluated?

from ggvis.

jcheng5 avatar jcheng5 commented on August 28, 2024

Oh, so is Option 1.5 equally hard to make work? That's what I was basing it off of.

from ggvis.

jcheng5 avatar jcheng5 commented on August 28, 2024

Oh n/m I get it now.

from ggvis.

jcheng5 avatar jcheng5 commented on August 28, 2024

Is option 3 workable?

from ggvis.

hadley avatar hadley commented on August 28, 2024

@jcheng5 option 3 has the same problem - I can make it work with some heuristics, but it fail 1% of the time with weird error messages. Option 1.5 is easier to make work because it uses quote as well as ~.

from ggvis.

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.