$ operator is invalid for atomic vectors

824 views
Skip to first unread message

dsamhat

unread,
Feb 24, 2014, 11:12:06 AM2/24/14
to shiny-...@googlegroups.com
I have several Shiny apps running using Shiny Server.  Every few weeks I receive this error "$ operator is invalid for atomic vectors".  I found the fix to be just inserting a blank line in my server.R code and the saving the code.  I am not changing anything in the code.  Any ideas why I keep encountering this issue?

Yihui Xie

unread,
Feb 26, 2014, 12:18:51 AM2/26/14
to dsamhat, shiny-discuss
Is that the complete error message? Normally R will tell you where the
error came from, e.g.

Error in session$sendInputMessage : $ operator is invalid for atomic vectors

Without the name of the function that signaled the error, it will be
difficult to diagnose the problem.

Regards,
Yihui

dsamhat

unread,
Mar 3, 2014, 10:14:35 AM3/3/14
to shiny-...@googlegroups.com, dsamhat
Hi Yihui, 

Yes that is the complete error message that displays on the Shiny app page where my Google charts would be.  It is hard to replicate locally in R and it seems to only happen on R Server.  In any case, it continues to happen and the fix is adding an empty line to my code and saving it.  Any further thoughts?

Thanks, 
David

ZJ

unread,
Mar 3, 2014, 11:21:10 AM3/3/14
to shiny-...@googlegroups.com, dsamhat
I get this error if I passed the session to the function wrong. e.g. suppose the function f has two arguments like so f(session, something_else) then if i didn't pass session to it or I accidentally used something else as the first argument then I get something like this.

Yihui Xie

unread,
Mar 3, 2014, 2:13:48 PM3/3/14
to ZJ, shiny-discuss, dsamhat
ZJ: that is also my first reaction :)

David: sorry, I have no other ideas...

Regards,
Yihui
Reply all
Reply to author
Forward
0 new messages