h2oai / h2oai/nitro

R API proposal

Open
#9 3 comments 0 reactions 1 assignee Claimed by @lo5 View on GitHub
area/protocol area/R type/proposal
Dominant language
TypeScript
Stars
202
Forks
10
PR merge metrics
No merged PRs in 30d

Description

What's the simplest, most ergonomic and idiomatic equivalent of the following Python code in R?

```py
# Prompt for first and last names.
first_name, last_name = view(
box('First name', value='Boaty'),
box('Last name', value='McBoatface'),
)
# Print the entered values
view(f'Hello, {first_name} {last_name}!')
```

Source: https://nitro.h2o.ai/basics/#get-multiple-inputs-at-once

For context, this is what the above code would've looked like if Python didn't have destructuring assignments:

```py
# Prompt for first and last names.
result = view(
box('First name', name='first_name', value='Boaty'),
box('Last name', name='last_name', value='McBoatface'),
)
# Print the entered values
view(f'Hello, {result['first_name']} {result['last_name']}!')
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.