我正在建立我的第一个Shiny应用程序,旨在创建抵押贷款计算器和可调节的amoritization时间表.我能够使用runApp()获取以下代码,但它不起作用(即,不输出任何值,也不显示图形).此外,它在RStudio的控制台中生成以下错误:
".getReactiveEnvironment()中的错误$ currentContext():没有活动的反应上下文时不允许操作.(你试图做一些只能在反应式表达式或观察者内部完成的事情.)"
对于后台,我正在运行:Win 7,64位OS | R v3.1.1 | RStudio v0.98.944
并试图实现这里定义的程序没有运气: R R Shiny中的闪亮教程错误- 没有选择器的数字输入
ui.R
library(shiny)
shinyUI(
pageWithSidebar(
headerPanel(
h1('Amoritization Simulator for Home Mortgages'),
windowTitle = "Amoritization Simulator"
),
sidebarPanel(
h3('Mortgage Information'),
h4('Purchase Price'),
p('Enter the total sale price of the home'),
textInput('price', "Sale Price ($USD)", value = ""),
h4('Percent Down Payment'),
p('Use the slider to select the percent of the purchase price you
intend to pay as a down payment at the time of purchase'), …Run Code Online (Sandbox Code Playgroud) 我正在开发一个 Shiny 应用程序,旨在猜测用户输入的文本片段中的下一个单词。为此,我加载三个数据帧,其中包含对下一个单词的可能猜测,并使用 grepl 查找与用户输入文本末尾的三元组或二元组匹配。我在“常规”R 中构建了这个,没有错误或问题,但是当将其转换为 Shiny 时,我收到此错误:
错误:求值嵌套太深:无限递归/选项(表达式=)?
正如其他堆栈溢出帖子所建议的那样,我摆弄了选项(表达式=)值,但仍然遇到错误。没有太多其他信息来指导我,并且注意到它没有问题,任何人都可以看到我哪里出了问题吗?提前致谢!
作为背景,我正在运行:Win 7,64 位操作系统 | R v3.1.1 | RStudio v0.98.944
ui.R
library(shiny)
shinyUI(fluidPage(
titlePanel("Capstone: Word Guesser"),
fluidRow(
column(12,
mainPanel(
h4('Sentence Fragment'),
p('Please enter a snippet of text - with this as a start, the app will provide you 5 guesses in ranked order to complete your phrase'),
textInput('sentence', "Snippet:", value = "Enter some text and have a great"),
h4('Guesses'),
p('Below are our top five guesses for the word that completes this …Run Code Online (Sandbox Code Playgroud)