I have made some changes to the script, and it works. It produces the effect that I was expecting, however, I get a large message after the fact that I do not understand, and the exexution halts. PLease see below
title: "Project"
author: "Giuseppa Cefalu"
date: "2026-08-24"
output: html_document
runtime: shiny
knitr::opts_chunk$set(echo = TRUE)
Libraries
suppressMessages(suppressWarnings(library(shiny)))
suppressMessages(suppressWarnings(library(dplyr)))
suppressMessages(suppressWarnings(library(shinyPredict)))
Data
datasets <- list(Formaldehyde = Formaldehyde, Indometh = Indometh, LifeCycleSavings = LifeCycleSavings,
OrchardSprays = OrchardSprays, Theoph = Theoph, chickwts = chickwts,faithful = faithful, randu = randu,ChickWeight = ChickWeight, Loblolly = Loblolly,anscombe = anscombe, beaver1 = beaver1, nottem = nottem, stackloss = stackloss, swiss = swiss, DNase = DNase, Nile = Nile,
mtcars = mtcars, trees = trees)
Create GUI
The first part of the GUI displays the project's name and a list of radiobutons, each one wih a data set name to select the data set on which the statistics will be done. The user must select a data set.
# Create project's title panel
titlePanel(tags$h2("STATISTICAL ANALYSIS AND LINEARITY FOR R DATA SETS", style = "color: blue;"))
Reactive Expression:
A reactive expression is an R expression that takes user gui input and returns a value. The reactive expression will update this value whenever the original input changes. THis is where he user selects a data set name from he radiobuttons list. If he user selecs a different data set, this expression will update the value.
# Create radio buttons list of data set names to select data set
radioButtons("inDs", "Select dataset:", choices = names(datasets))
# reactive expressions update when the input changes.
ds <- reactive( datasets[[input$inDs]] )
reactive(print(head(ds())))
varSelectInput("inVar", "Select variable:", datasets[[1]])
reactive(
updateVarSelectInput(session, "inVar", data = ds())
)
Public:
.now: function ()
.scheduleTask: function (millis, callback)
@uploadEnd: function (jobId, inputId)
@uploadInit: function (fileInfos)
allowReconnect: function (value)
cache: cache_mem, cachem
clientData: reactivevalues
clone: function (deep = FALSE)
close: function ()
closed: FALSE
createBookmarkObservers: function ()
cycleStartAction: function (callback)
decrementBusyCount: function ()
defineOutput: function (name, func, label)
dispatch: function (msg)
doBookmark: function ()
downloads: Map, R6
exportTestValues: function (..., quoted_ = FALSE, env_ = parent.frame())
files: Map, R6
fileUrl: function (name, file, contentType = "application/octet-stream")
flushOutput: function ()
freezeValue: function (x, name)
getBookmarkExclude: function ()
getCurrentOutputInfo: function ()
getCurrentTheme: function ()
getOutput: function (name)
getTestSnapshotUrl: function (input = TRUE, output = TRUE, export = TRUE, format = "json",
groups: NULL
handleRequest: function (req)
incrementBusyCount: function ()
initialize: function (websocket)
input: reactivevalues
isClosed: function ()
isEnded: function ()
makeScope: function (namespace)
manageHiddenOutputs: function (outputsToCheck = NULL)
manageInputs: function (data, now = FALSE)
ns: function (id)
onBookmark: function (fun)
onBookmarked: function (fun)
onEnded: function (endedCallback)
onFlush: function (flushCallback, once = TRUE)
onFlushed: function (flushedCallback, once = TRUE)
onInputReceived: function (callback)
onRestore: function (fun)
onRestored: function (fun)
onSessionEnded: function (sessionEndedCallback)
onUnhandledError: function (callback)
options: list
output: shinyoutput
outputOptions: function (name, ...)
progressStack: list
reactlog: function (logEntry)
registerDataObj: function (name, data, filterFunc)
registerDownload: function (name, filename, contentType, func)
reload: function ()
request: environment
requestFlush: function ()
resetBrush: function (brushId)
restoreContext: RestoreContext, R6
rootScope: function ()
sendBinaryMessage: function (type, message)
sendChangeTabVisibility: function (inputId, target, type)
sendCustomMessage: function (type, message)
sendInputMessage: function (inputId, message)
sendInsertTab: function (inputId, liTag, divTag, menuName, target, position,
sendInsertUI: function (selector, multiple, where, content)
sendModal: function (type, message)
sendNotification: function (type, message)
sendProgress: function (type, message)
sendRemoveTab: function (inputId, target)
sendRemoveUI: function (selector, multiple)
setBookmarkExclude: function (names)
setCurrentTheme: function (theme)
setShowcase: function (value)
showProgress: function (id, persistent = FALSE)
singletons:
startTiming: function (guid)
token: 7be6db8219e2f55839dd621af64b5ab1
unhandledError: function (e, close = TRUE)
updateQueryString: function (queryString, mode)
user: NULL
userData: environment
wsClosed: function ()
Private:
.clientData: ReactiveValues, R6
.input: ReactiveValues, R6
.outputOptions: list
.outputs: list
bookmarkCallbacks: environment
bookmarkedCallbacks: environment
bookmarkExclude:
busyCount: 1
closedCallbacks: environment
currentOutputName: outf94917098d573b21
currentThemeDependency: function (x)
cycleStartActionQueue: list
enableTestSnapshot: function ()
fileUploadContext: environment
flushCallbacks: environment
flushedCallbacks: environment
getBookmarkExcludeFuns: list
getOutputOption: function (outputName, propertyName, defaultValue)
getSnapshotPreprocessInput: function (name)
getSnapshotPreprocessOutput: function (name)
inputMessageQueue: list
inputReceivedCallbacks: environment
invalidatedOutputErrors: Map, R6
invalidatedOutputValues: Map, R6
outputInfo: list
outputValues: list
progressKeys:
registerBookmarkExclude: function (fun)
registerSessionEndCallbacks: function ()
restoreCallbacks: environment
restoredCallbacks: environment
sendErrorResponse: function (requestMsg, error)
sendMessage: function (...)
sendResponse: function (requestMsg, value)
shouldSuspend: function (name)
showcase: FALSE
startCycle: function ()
storeOutputValues: function (values = NULL)
testExportExprs: list
testMode: FALSE
testSnapshotUrl: session/7be6db8219e2f55839dd621af64b5ab1/dataobj/shinyte ...
timingRecorder: ShinyServerTimingRecorder, R6
unhandledErrorCallbacks: environment
websocket: WebSocket, R6
withCurrentOutput: function (name, expr)
write: function (json)