"REmap" object in tabItem can't display - r

I use the shinydashboard to develop Web application then meet a problem. As follows:
Server:
output$track_train <- renderREmap(
remapB(
center = BJU,
zoom = 9,
color = "grassgreen",
markLineData = markLine_data,
markPointData = markPointData,
markLineTheme = markLine_Control,
markPointTheme = markPointTheme,
geoData = gdata))
UI:
body <- dashboardBody(
tabItems(
tabItem(tabName = "wifi_01_company",
tabsetPanel(type = "tabs",
tabPanel("trail",
icon = icon("tag"),
REmapOutput("track_train")
),...
error message:
Uncaught TypeError: Cannot read property 'options' of undefined
at HTMLDocument.<anonymous> (app.js:156)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.K (jquery.min.js:2) htmlwidgets.js:475
Uncaught TypeError: Cannot read property 'filter' of undefined
at exports.OutputBinding.shinyBinding.find (htmlwidgets.js:475)
at a (init_shiny.js:15)
at f (init_shiny.js:215)
at initShiny (init_shiny.js:279)
If I comment "REmapOutput("track_train")" , everything is OK.
If I modify code: dashboardSidebar(disbale=TRUE), Simple to box(REmapOutput("track_train")), everythig is OK.
How can I output "REmap" object in tabItem? Please help me, thankes.
REmap is R package, the source code: https://github.com/Lchiffon/REmap

Related

How to properly run an API GET request with ODBC access?

Im trying to create an API that receives an ID, queries a MSSQL database and returns back a result.
#* #apiTitle IdCx
#* #apiDescription A test
#* #get /IdCx
#*
apiFn <- function(id) {
require(odbc)
require(glue)
dbcon <- dbConnect(odbc::odbc()
,dsn = "test"
,database = "testDB"
,uid = user1
,pwd = pass1
,Trusted_Connection= "No"
,encoding = "UTF-8"
)
IdCx = dbGetQuery(dbcon, glue_sql('SELECT max (CC.IdCx)
FROM table CC
where IdA in ({id})
'))
as.numeric(IdCx)
}
After creating the R file main.R, I execute it:
apiTest <- pr("main.R")
pr_run(apiTest)
But I get this error
{
"error": "500 - Internal server error",
"message": "Error in h(simpleError(msg, call)): error in evaluating the argument 'statement' in selecting a method for function 'dbGetQuery': error in evaluating the argument 'conn' in selecting a method for function 'dbQuoteLiteral': el argumento \".con\" is missing, with no default\n"
}
But if I deliberately insert a fixed id=1365350 inside the code (just for testing), the API will return a correct result
#* #apiTitle IdCx
#* #apiDescription A test
#* #get /IdCx
#*
apiFn<- function(id) {
require(odbc)
require(glue)
id=1365350
dbcon <- dbConnect(odbc::odbc()
,dsn = "venus"
,database = "DWHICV"
,uid = Sys.getenv("sql_reportes_id")
,pwd = Sys.getenv("sql_reportes_pw")
,Trusted_Connection= "No"
,encoding = "UTF-8"
)
IdCx = dbGetQuery(dbcon, glue_sql('SELECT max (CC.IdCx)
FROM hceCxCirugia CC
where IdAtencion in ({id})
'))
as.numeric(IdCx)
}
Including #* #param IdA wont fix the error
Figured it out. Eventhough I never used the parameter .con inside the glue_sql function when running it from RStudio, apparently is mandatory when using plumber API.
IdCx = dbGetQuery(dbcon, glue_sql('SELECT max (CC.IdCx)
FROM table CC
where IdA in ({id})
,.con = dbcon))

Control display of an ipyvuetify page by a dropdown works in notebook not in voila

I have encountered another working in notebook but not in voila issue. I have tried for a couple of hours but feel like I am still missing something and therefore seeking expert opinions here.
I have a function create_pages_and_run() that takes in a dictionary, d, as an input to generate a dashboard (the data type is ipyvuetify.generated.App.App). The dictionary can be retrieved from a json file scenario_dict using a country name as key where I designed a dropdown to collect the country name.
The purpose is to ask user to select a country name and the page will be redrawn/refreshed. I have the following code that works in notebook but not in Voila. (Works means that when a new country name is selected, the dashboard is displayed with the widgets using data from that countries)
scenario_dropdown = widgets.Dropdown(
options=all_scenarios,
value=initial_scenario,
description="Scenario",
layout=widgets.Layout(margin="0 20px 0 0", height="39px", width="15%"),
)
d = scenario_dict[initial_scenario]
app = create_pages_and_run(d)
#the below code works for notebook
def on_change(change):
global d, app
if change["name"] == "value" and (change["new"] != change["old"]):
d = scenario_dict[change["new"]]
app = create_pages_and_run(d)
clear_output()
display(app)
scenario_dropdown.observe(on_change)
My failed code using ipywidgets.Output is as below. (Failed in the sense, after selecting country name in the dropdown no change is observed).
scenario_dropdown = widgets.Dropdown(
options=all_scenarios,
value=initial_scenario,
description="Scenario",
layout=widgets.Layout(margin="0 20px 0 0", height="39px", width="15%"),
)
d = scenario_dict[initial_scenario]
app = create_pages_and_run(d)
out = widgets.Output()
with out:
display(app)
# the code works failed for voila
def on_change(change):
global d, app, out
if change["name"] == "value" and (change["new"] != change["old"]):
d = scenario_dict[change["new"]]
app = create_pages_and_run(d)
out.clear_output()
with out:
display(app)
display(out)
scenario_dropdown.observe(on_change)
I appreciate your help, thanks.
I'm not sure why your code didn't work. Maybe it was the use of globals which can be avoided. Could you provide a working example to test. Here is a working example based on your code that works in Voila.
import ipywidgets as widgets
all_scenarios = ['aa','bb','cc']
initial_scenario = all_scenarios[0]
scenario_dict = {}
scenario_dict['aa'] = 'do_this'
scenario_dict['bb'] = 'do_that'
scenario_dict['cc'] = 'do_what'
def create_pages_and_run(action):
print(action)
scenario_dropdown = widgets.Dropdown(
options=all_scenarios,
value=initial_scenario,
description="Scenario",
layout=widgets.Layout(margin="0 20px 0 0", height="39px", width="15%"),
)
d = scenario_dict[initial_scenario]
out = widgets.Output()
with out:
create_pages_and_run(d)
app = widgets.VBox([scenario_dropdown, out])
def on_change(change):
if change["name"] == "value" and (change["new"] != change["old"]):
d = scenario_dict[change["new"]]
out.clear_output()
with out:
create_pages_and_run(d)
scenario_dropdown.observe(on_change)
app

Authentification Scope Problems with Google Analytics API in Shiny Dashboard

I am setting up a Shiny Dashboard to get unsampled reports through the Google Analytics Report API. This is my first Shiny-Projekt so maybe the solution to my problem is very simple. Unfortunately i can not find anything which would help me. So welcome to my very first question on Stackoverflow :).
I already set the authentication scope to the highest and set an client web id in an own projekt. Basicly everything which is best practiced in all found tutourials (Big Respect to Mark Edmondson!).
library(shiny) # R webapps
library(googleAuthR) # auth login
# refresh authenticiaction token and set client scope
gar_set_client(web_json = "CLIENTID-JSONFILE", scopes = ("https://www.googleapis.com/auth/analytics"))
library(googleAnalyticsR)
####################
# Shiny: USER INTERFACE
####################
# Define UI
ui <- fluidPage(
# Authorization Login-Button
googleAuth_jsUI("auth", login_text = "Log In"),
# Drop-Down Menue: Account, Property, View
column(width=12, authDropdownUI("auth_dropdown", inColumns = FALSE)), # Modul Auswahl des Views 1 von 2
dateRangeInput("datepicker", NULL, start = Sys.Date()-30),
# The dimension selector (dropdown)
selectInput("dim", label = "Please select at least one dimension",
choices = dimension_options,
selected = c("date","hour","minute"),
multiple = TRUE),
# The metric dropdown
selectInput("metric", label = "Please select at least one and maximal ten metrics",
choices = metric_options,
selected = "sessions",
multiple = TRUE),
# Download Button
downloadButton("downloadData", "Download")
)
####################
# Shiny: SERVER LOGIK
####################
# Define server logic
server <- function(input, output, session) {
# get authorizatin token
auth <- callModule(googleAuth_js,"auth")
# Accountliste:
ga_accounts <- reactive({
req(auth())
with_shiny(
ga_account_list,
shiny_access_token = auth())
})
# Views: Greift auf die Accountliste zu
view_id <- callModule(authDropdown, "auth_dropdown",
ga.table = ga_accounts)
# Daten abrufen
ga_data <- reactive({
req(view_id())
req(input$datepicker)
req(input$dim)
req(input$metric)
with_shiny(
google_analytics,
view_id(),
date_range <- input$datepicker,
metrics <- input$metric,
dimensions <- input$dim,
max = -1, #kein Sampling
shiny_access_token = auth()
)
})
# Daten downloaden
output$downloadData <- downloadHandler(
filename = function() {
paste("ViewID_",view_id(), ".csv", sep="")
},
content = function(file){
write.csv2(ga_data(), file, row.names = FALSE)
})
}
# Run the application
shinyApp(ui = ui, server = server)
The Problem is, that i get the following Error-Code despite the Code worked a few days before:
Warning: Error in : API returned: Insufficient Permission: Request had insufficient authentication scopes.
93: stop
92: checkGoogleAPIError
91: _f
89: cachedHttrRequest
88: memDoHttrRequest
87: f
86: gar_api_page
85: f
84: with_shiny
83: <reactive:ga_accounts> [S:/GA_Report_Shiny/shinyapp_v0.R]
67: ga.table
66: <reactive>
50: pList
44: <observer>
1: runApp
You need "https://www.googleapis.com/auth/analytics.edit" to list GA accounts, which is what is needed for the ga.table function above.
The very first Shiny-Project you need to understand Google Analytics Report API. See below I mention API console support two type of credentials. OAuth 2.0 and API Keys.
// Create the service.
var service = new DiscoveryService(new BaseClientService.Initializer
{
ApplicationName = "Discovery Sample",
ApiKey="[YOUR_API_KEY_HERE]",
});
// Run the request.
Console.WriteLine("Executing a list request...");
var result = await service.Apis.List().ExecuteAsync();
// Display the results.
if (result.Items != null)
{
foreach (DirectoryList.ItemsData api in result.Items)
{
Console.WriteLine(api.Id + " - " + api.Title);
}
}
You can also refer them for a more complete solution.

API query using dateRangeInput in R

I am trying to query a range of dates from an API in R/Shiny. I use dateRangeInput to specify the range, and the API documentation specifies that the call is:
spuddate, Value should be in the RFC3339 format, Latest date that drilling commenced on the property. Example: spuddate=gt(2006-01-02T15:04:05Z) spuddate=le(2017-03).
How would I do this correctly?
I've tried several methods using anytime and rfc3339 but I keep getting various errors. I suspect it has to be something around the way I structure the input call in server.
#UI - Obviously there are more but for sake of brevity here is the subset
sidebarPanel(
fluidRow(
column(12,
selectizeInput('stateSelect','STATE', choices= paste0(state.abb, sep=''), multiple=FALSE))
),
fluidRow(
column(12,
selectizeInput('directionSelect','HOLE DIRECTION', choices= c('H','V','D','U'), multiple=FALSE))
),
fluidRow(
column(12,
dateRangeInput("dateSelect", label = h3("Spud Date range")))
),
#Server Try So Far -- Obviously there are more but for sake of brevity here is the subset
observeEvent(input$select, {
wellInfo <- GET("https://di-api.drillinginfo.com/v2/direct-access/producing-entities",
add_headers(c('X-API-KEY' = key, 'Authorization' = addToken, 'Accept' = 'text/xml')),
query=list(drilltype = dput(input$directionSelect), state = dput(input$stateSelect),
spuddate = (rfc3339(anytime(input$dateSelect[1])),rfc3339(anytime(input$dateSelect[2]))),
pagesize = 100000))
})
I just want to get the query to go off. It works without the spuddate call (ie just the state and drilltype query). Any help would be appreciated! Thanks.
Ok, figured out a brute force solution.
date1 <- paste('btw(',date(anytime(input$dateSelect[1])),
',',date(anytime(input$dateSelect[2])),')', sep='')
wellInfo <- GET("https://di-api.drillinginfo.com/v2/direct-access/producing-entities",
add_headers(c('X-API-KEY' = key, 'Authorization' = addToken, 'Accept' = 'text/xml')),
query=list(drilltype = dput(input$directionSelect), state = dput(input$stateSelect),
spuddate = dput(date1),
#spuddate <= (as.POSIXct(as.character(input$dateSelect2, format = '%Y-%m'))),
pagesize = 100000))

Shiny - app loads but it does not read the data file

I am trying to build my first shiny app in which I want my app to read different files based on user selected inputs. I have managed to build the ui.R, server.R, and helper.R functions so that I am not getting errors but my app is not working i.e. the file does not load. Nothing happens when I select different inputs, it appears that my read file function in my Helper.R script is not working. I have been stuck on this for days and I would very much appreciate some help to get this working.
ui.R
shinyUI(fluidPage(
titlePanel(“Search RSQRM Asset Data”),
fluidRow(
column(3,
selectInput(“model”, label = h3(“Select Model”),
choices = c(“RSQRM Global”, “RSQRM Europe”,”RSQRM US”,”RSQRM Japan”,”RSQRM Asia ex-JP”), selected = ‘RSQRM Global’)),
column(3,
selectInput(“modelCurrency”, label = h3(“Select Model Currency”),
choices = c(“USD”,”EUR”,”JPY”), selected = ‘EUR’)),
column(3,
dateInput(“modelDate”,
label = h3(“Select Model Date”),
value = “2014-04-23″)),
column(3,
radioButtons(“modelVersion”, label = h3(“L or G Version”),
choices = c(“Local Currency Exposure”, “Global Currency Exposure”),selected = “Local Currency Exposure”)),
helpText(“Note: Select the correct combination of model region and base currency.”),
submitButton(“Update View”)
),
# Create a new row for the table.
fluidRow(
dataTableOutput(outputId=”assetData”)
)
))
=============
server.R
library(timeDate);library(data.table)
source("helper.R")
# Define a server for the Shiny app
shinyServer(function(input, output) {
sModelPath<-'T:/Documents/Rsquared/RSQRM/'
#Assign switch values for the input fields
dfAssetData <- reactive({
sModel <- switch(input$model, "RSQRM Global"==as.character('GlobalDev'),
"RSQRM Europe"=as.character('Europe'),
"RSQRM US"=as.character('US'),
"RSQRM Japan"=as.character('Japan'),
"RSQRM Asia ex-JP"=as.character('AsiaExJP'))
sModelCurrency <- switch(input$modelCurrency, "USD"=as.character('USD'),"EUR"=as.character('EUR'),"JPY"=as.character('JPY'))
sModelVersion <- switch( input$modelVersion, "Local Currency Exposure"="", "Global Currency Exposure"=as.character("_G"))
sModelDate <- input$modelDate
readAssetDataFile(sModelPath=sModelPath,sModel=sModel,sModelCurrency=sModelCurrency,sModelDate=sModelDate,sModelVersion=sModelVersion)
})
output$assetData <- renderDataTable(
dfAssetData,options=list(iDisplayLength = 25)
)
})
=============
helper.R
# Constructs File Path and reads File
readAssetDataFile <- function(sModelPath,sModel,sModelCurrency,sModelDate,sModelVersion)
{
#Build Model file path
if(sModel=='GlobalDev')
{
sModelFile<-paste(sModelPath,sModel,'/outputData/','FF_RSQ_RSQRM_GlobalDev_v2_19_8_',sModelCurrency,'_',format(sModelDate,"%Y%m%d"),'_AssetData.txt',sep='')
} else if(sModel=='Europe')
{
sModelFile<-paste(sModelPath,sModel,'/outputData/','FF_RSQ_RSQRM_Europe',sModelVersion,'_v2_19_9_',sModelCurrency,'_',format(sModelDate,"%Y%m%d"),'_AssetData.txt',sep='')
} else if(sModel=='US')
{
sModelFile<-paste(sModelPath,sModel,'/outputData/','FF_RSQRM_US_v2_19_7_',sModelCurrency,'_',format(sModelDate,"%Y%m%d"),'_AssetData.txt',sep='')
} else if(sModel=='Japan')
{
sModelFile<-paste(sModelPath,sModel,'/outputData/','FF_RSQ_RSQRM_Japan_v2_19_4_',sModelCurrency,'_',format(sModelDate,"%Y%m%d"),'_AssetData.txt',sep='')
} else if(sModel=='AsiaExJP')
{
sModelFile<-paste(sModelPath,sModel,'/outputData /','FF_RSQ_RSQRM_AsiaExJP_v2_19_6_',sModelCurrency,'_',format(sModelDate,"%Y%m%d"),'_AssetData.txt',sep='')
}
#Read Asset Data File
dfDataHeader<-t(scan(sModelFile,skip=2,nlines=1,what = 'character',sep='|'))
dfData<-read.csv(sModelFile,sep='|',skip=3,header=F,stringsAsFactors=F)
names(dfData)<-dfDataHeader
return(dfData)
}
=============
extract of one of the source files
Asset Data|RSQRM_GlobalDev_v2_19_8_EUR
Date|20140423
RSQID|Parent ID|Currency Of Quotation|Domicile|Exchange Country|ADR|Current Price|Local Mkt Cap|Name|Return|Specific Return|Model R-Squared|Historical Variance|Model Variance|Base Currency Mkt Cap
AED||USD|#N/A|#N/A|0|0.272242|0|United Arab Dirham|-0.00525701|-1.019239e-005|0.9999894|0.008664313|0.01005771|0
ARS||USD|#N/A|#N/A|0|0.1249497|0|Argentine Peso|-0.004397333|0|1|0.01426818|0.01750348|0
AUD||USD|#N/A|#N/A|0|0.9287573|0|Australian Dollar|0.006424189|0|1|0.01322997|0.01398572|0
BRL||USD|#N/A|#N/A|0|0.4455243|0|Brazilian Real|0.03908932|0|1|0.01858497|0.01901002|0
BWP||USD|#N/A|#N/A|0|0.1141982|0|Botswana Pula|0.01457977|0.01029778|0.8950179|0.0081137|0.008672097|0
CAD||USD|#N/A|#N/A|0|0.9057439|0|Canadian Dollar|0.01092219|0|1|0.007959329|0.008564582|0
CHF||USD|#N/A|#N/A|0|1.133649|0|Swiss Franc|0.00140202|0|1|0.003511256|0.005111289|0
CLP||USD|#N/A|#N/A|0|0.001774098|0|Chilean Peso|-0.03123808|0|1|0.01214774|0.01481514|0
CNY||USD|#N/A|#N/A|0|0.160308|0|Chinese Yuan Renminbi|-0.01323205|0|1|0.008269959|0.009692453|0
COP||USD|#N/A|#N/A|0|0.0005161191|0|COLOMBIAN PESO|0.03332853|0|1|0.01231008|0.01293377|0
EGP||USD|#N/A|#N/A|0|0.1429034|0|Egyptian Pound|-0.01327199|-0.00800544|0.9377586|0.01042045|0.01099546|0
EUR||USD|#N/A|#N/A|0|1.38284|0|EURO|0|0|0|0|0|0
GBP||USD|#N/A|#N/A|0|1.6778|0|POUNDS STERLING|0.01696134|0|1|0.005241998|0.005920209|0
HKD||USD|#N/A|#N/A|0|0.1289722|0|Hong Kong Dollar|-0.003935099|0.001270294|0.9993091|0.008515768|0.009881006|0
HUF||USD|#N/A|#N/A|0|0.004495231|0|Hungarian Forint|0.0242871|0|1|0.01060005|0.009236147|0
IDR||USD|#N/A|#N/A|0|8.598194e-005|0|Indonesian Rupiah|-0.03087831|0|1|0.01365197|0.01479055|0
ILS||USD|#N/A|#N/A|0|0.2871667|0|Israeli Shekel|-0.0003501177|0|1|0.006951562|0.006442094|0
INR||USD|#N/A|#N/A|0|0.01635841|0|Indian Rupee|-0.03235179|0|1|0.01130393|0.01236205|0
ISK||USD|#N/A|#N/A|0|0.008922095|0|Icelandic Krona|0.0171473|0.03882897|0.297565|0.04469517|0.04829158|0
JPY||USD|#N/A|#N/A|0|0.00976686|0|Japanese Yen|-0.00645864|0|1|0.01881293|0.01908195|0
KRW||USD|#N/A|#N/A|0|0.0009616939|0|South Korean Won|0.05476844|0|1|0.009969143|0.01028664|0
KWD||USD|#N/A|#N/A|0|3.555414|0|Kuwaiti Dinar|-0.002247274|0.002172351|0.9813095|0.006397537|0.007210578|0
KZT||USD|#N/A|#N/A|0|0.005493779|0|Kazakhstan Tenge|-0.004944563|0.01499879|0.807177|0.01728362|0.02166266|0
LTL||USD|#N/A|#N/A|0|0.4005443|0|Lithuanian Litas|0.000264883|0.0002661943|0.1098195|4.386074e-006|1.170735e-005|0
MXN||USD|#N/A|#N/A|0|0.07643005|0|Mexican Nuevo Peso|0.0002846718|0|1|0.01561729|0.01448273|0
MYR||USD|#N/A|#N/A|0|0.3061288|0|Malaysian Ringgit|0.01157045|0|1|0.008959501|0.009135634|0
NAD||USD|#N/A|#N/A|0|0.09418435|0|Namibia Dollar|0.005982637|-0.001955748|0.9904171|0.02083048|0.01997479|0
NOK||USD|#N/A|#N/A|0|0.1668374|0|Norwegian Krone|0.009662986|0|1|0.004682287|0.004911323|0
NZD||USD|#N/A|#N/A|0|0.8582975|0|New Zealand Dollar|-0.009660542|0|1|0.01219613|0.01205033|0
PEN||USD|#N/A|#N/A|0|0.3584124|0|Peruvian Nuevo Sol|0.009532809|0|1|0.01369225|0.01090846|0
PHP||USD|#N/A|#N/A|0|0.02233582|0|Philippine Peso|0.0008690357|0|1|0.008781091|0.009171846|0
PLN||USD|#N/A|#N/A|0|0.3299508|0|Polish New Zloty|-0.003601432|0|1|0.008027087|0.007835649|0
QAR||USD|#N/A|#N/A|0|0.2746395|0|Qatari Rial|-0.004940689|0.0003093481|0.9999509|0.008670089|0.01006616|0
RON||USD|#N/A|#N/A|0|0.3093118|0|ROMANIAN LEU (NEW)|0.0001454353|0|1|0.002584549|0.003188807|0
RSD||USD|#N/A|#N/A|0|0.01196992|0|Serbia Dinar|0.002955198|0.002888322|0.3149524|0.005209823|0.005366478|0
RSQ00100301|RSQP001003|USD|US|US|0|0|0|A.A. IMPORTING CO INC|0|0|0.2278523|0.5409994|0.6483656|0.0388042
RSQ00100401|RSQP001004|USD|US|US|0|26.61|0|AAR CORP|0.03524399|-0.0009624362|0.6713049|0.1861986|0.1837458|761.4265
RSQ00101901|RSQP001019|USD|US|US|0|275|0|AFA PROTECTIVE SYSTEMS INC|-0.005258679|-0.01361179|0.546496|0.03353066|0.04896197|38.38115
RSQ00102101|RSQP001021|USD|US|US|0|3|0|AFP IMAGING CORP|-0.005258679|0.01126492|0.2947952|1.234856|1.125692|0.07810013
RSQ00104501W|RSQP001045|MXN|US|MX|0|460|0|AMERICAN AIRLINES GROUP INC|-0.107383|-0.1256154|0.2745233|0.544104|0.552039|19222.34
RSQ00104504|RSQP001045|USD|US|US|0|36.16|0|AMERICAN AIRLINES GROUP INC|-0.03031355|-0.05283874|0.342698|0.6602146|0.4509373|12329.74
RSQ00105001|RSQP001050|USD|US|US|0|16.69|0|CECO ENVIRONMENTAL CORP|0.0177182|-0.01030165|0.4680261|0.1776531|0.1898829|309.8809
RSQ00107201|RSQP001072|USD|US|US|0|13.39|0|AVX CORP|0.04942906|0.04780984|0.7066215|0.04772019|0.05692234|1628.753
RSQ00107501|RSQP001075|USD|US|US|0|55.6|0|PINNACLE WEST CAPITAL CORP|0.03970087|-0.02854544|0.8831447|0.03975214|0.0374972|4436.935
RSQ00107601|RSQP001076|USD|US|US|0|30.13|0|AARON'S INC|-0.02922386|-0.02090919|0.5094755|0.07882757|0.07039738|1568.27
RSQ00107801|RSQP001078|USD|US|US|0|38.6|0|ABBOTT LABORATORIES|0.006312132|0.03443837|0.4539649|0.09144053|0.08155435|43072.59
RSQ00107801W|RSQP001078|USD|US|GB|0|38.62|0|ABBOTT LABORATORIES|-0.002148151|0.006967425|0.2366017|0.08802702|0.1942208|43094.9
RSQ00107802W|RSQP001078|CHF|US|CH|0|33.75|0|ABBOTT LABORATORIES|-0.02139831|-0.09285313|0.2569895|0.4222401|0.2419817|42693.91
RSQ00108401|RSQP001084|USD|US|US|0|0.157|0|WORLDS INC|0.07596767|0.06546307|0.4029619|1.849886|1.528729|10.58255
RSQ00109401|RSQP001094|USD|US|US|0|21.77|0|ACETO CORP|0.1782798|0.1492193|0.6505797|0.1856081|0.1646115|446.7853
RSQ00109601|RSQP001096|USD|CA|US|0|117.8482|0|ACKTON CORP|0.05328643|-0.01130325|1|0.07294457|0.02986959|1066.637
When you call a reactive variable, call it as you would when calling a function.
For example, in your output$assetData when you call dfAssetData, try this...
output$assetData <- renderDataTable(
dfAssetData(),options=list(iDisplayLength = 25)
)
There may be more to the problem but that is the first error I see.

Resources