-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
26 lines (20 loc) · 656 Bytes
/
ui.R
File metadata and controls
26 lines (20 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Load library
library(shiny)
shinyUI(pageWithSidebar(
headerPanel("Mortgage Payment Calculator"),
sidebarPanel(
h4('Input parameters'),
numericInput('loanAmount', 'Loan Amount (€)', 0, min = 0),
numericInput('interestRate', 'Interest Rate (%)', 0, min = 0, step = 0.1),
numericInput('loanTerm', 'Loan Term (years)', 0, min = 0),
submitButton('Submit')
),
mainPanel(
h4('Instructions:'),
helpText("Complete your mortgage information on the left and press 'Submit' button to get monthly and yearly payments."),
br(),
h4('Payments:'),
# Print output
tableOutput("result")
)
))