Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab 4 - Issues with selectInput #15

Open
kpearce6 opened this issue Jul 8, 2020 · 4 comments
Open

Lab 4 - Issues with selectInput #15

kpearce6 opened this issue Jul 8, 2020 · 4 comments
Labels

Comments

@kpearce6
Copy link

kpearce6 commented Jul 8, 2020

Hi @jamisoncrawford. I was hoping you could help me with an issue I am having with Lab 4. Whenever I try to run my code, it always stops at the first selectInput and produces an error that says "could not find function "selectInput". I have tried many different inputIDs as well as looking at the code and not sure if I am just missing something. I have this included as a chunk before renderPlot. Here is currently what I have for the selectInput function:

selectInput(inputId='Teams',  
             label='Choose a Team',   
             choices=c("Cincinnati Reds","Pittsburg Pirates","Philadelphia Phillies","St. Louis Cardinals","Chicago White Sox","Detroit Tigers","Chicago Cubs","Boston Red Sox","New York Yankees","Cleveland Indians"),  
             selected="Cincinnati Reds"   
           )

Thanks!
Katie

@jamisoncrawford
Copy link
Collaborator

Hi @kpearce6, this code looks perfectly fine! Have you loaded Shiny with library(shiny) at the very beginning of your .R script?

If your error message says that it cannot recognize an object, and that object is a function, it typically means that R hasn't been told to load the package that contains that function. Let me know if that helps and sorry for the delay!

@kpearce6
Copy link
Author

kpearce6 commented Jul 8, 2020

Hi @jamisoncrawford. Thanks for getting back to me. I tried my code on another computer and it worked so not sure what happened. It should be all good now. I appreciate it!

@jamisoncrawford
Copy link
Collaborator

@kpearce6 well that's interesting! Figure out why it worked and you'll learn 1% of R 😄

Glad you got it working!

@lecy
Copy link
Collaborator

lecy commented Jul 9, 2020

When all else fails, take a nap and try again! Works for the computer too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants