0

I am trying to produce a user interactive table like Target table

The yellow columns represent editable columns, white ones can't be edited, and they work in following fashion

  • User updates column B and allocates 100% of distribution among the three rows(40,35,25 in this case). A total is shown in footer to help user identify correct allocation of 100%
  • Column A updates in backend by multiplying each % with a predetermined number(1000 in this case). A total is shown, which would be 1000 if user entered % correctly
  • User then enters values in column C. No total is necessary here
  • Column D is then calculated in backend as a product of column A and column C

Is this achievable by any simple means? I also then want to reuse this table for more calculations since this is the input prompt

Thank you very much.

LBZR
  • 161
  • 12

1 Answers1

0

You can do most or all of this with the tools you tagged but it won't be simple:

  • The DT package will not do all of this for you: you will also have to use reactivity.
  • This link discusses working with edited values in DT, providing an idea of the level of difficulty to expect: R -shiny- DT: how to update col filters.
  • In addition to what you see in the example, you want to add formatting, a totals row, and only allow editing of some columns, which will require more work.
da11an
  • 701
  • 4
  • 8