You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With dynamic inputs, we aim to simplify how code inside a code cell can be executed and automatically update its result. The result is a series of input fields that sit above the code cell or can be relocated elsewhere (?) on the page.
For instance, let's take the following simulation demo:
x<- rnorm(n, 5, 3)
hist(x)
We would expect to see a normal distribution centered at 5 with an SD of 3.
The variable n is omitted from the code but controls how many observations should be generated.
So, if we wanted a slider on the cell variables, we would use inside the cell:
With dynamic inputs, we aim to simplify how code inside a code cell can be executed and automatically update its result. The result is a series of input fields that sit above the code cell or can be relocated elsewhere (?) on the page.
For instance, let's take the following simulation demo:
We would expect to see a normal distribution centered at 5 with an SD of 3.
The variable
n
is omitted from the code but controls how many observations should be generated.So, if we wanted a slider on the cell variables, we would use inside the cell:
For an example of:
This ties the input / result change scope to the single interactive code area.
Alternatively, we could consider a shortcode outside of the cell:
As a result, we would get a document like so:
This was inspired by some of the fun observable toggles Bob Rudis demoed on mastodon.
Design questions:
n
) be updated?The text was updated successfully, but these errors were encountered: