R Shiny Error: Object of type 'closure' is not subsettable

0 votes

Error: Object of type 'closure' is not subsettable

I get the below error when I try to run the shiny app, below are the lines I have in r.

playertable = reactive({ data.frame(Teams = t1()$team1,Played = t1()$count+t2()$count,Wins = wl()$no_of_wins,Points = round(wl()$no_of_wins*2,)) })

playertable$Tied = reactive({ ifelse(playertable()$Teams == tied()$team1|playertable()$Teams == tied()$team2,1,0) })

Aug 20 in Data Analytics by archana
176 views

1 answer to this question.

0 votes
The error you mentioned happens when you try to use a reactive variable without () to use the variable inside the shiny app.

So check if all reactive values you have used in r code have ().

In your case, I think the error lies in your () next to  playertable$Tied, you have missed () next to playertable()$Tied.

Check it out again after adding ().
answered Aug 20 by anonymous
• 31,840 points

Related Questions In Data Analytics

0 votes
1 answer

Error saying "Error in df$item : object of type 'closure' is not subsettable" when trying to use arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,040 points
180 views
0 votes
1 answer

Error saying "ERROR: Expected tag to be of type header" while creating a dashboard using shiny R

sliderInput("bins","number of breaks",1,100,50), this line should come under ...READ MORE

answered Nov 29, 2018 in Data Analytics by Maverick
• 10,040 points
402 views
0 votes
1 answer

Error saying "could not find function "shinyUI"" in shiny R

Its a small spelling mistake that you've ...READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,040 points
465 views
0 votes
1 answer

Error saying "could not find function dashboardPage" in shiny R

Include this line in the code: Library(shinydashboard) READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,040 points
284 views
0 votes
1 answer