Running Rook apps in new R session

30 views
Skip to first unread message

bernard ck Wong

unread,
Aug 11, 2015, 5:00:12 PM8/11/15
to rRook
Hi, I have tried these demo codes on R (not RStudio which seems to have some issues)

library(Rook)
s <- Rhttpd$new()
s$start()
s$add(
  app=system.file('exampleApps/helloworld.R',package='Rook'),
  name='hello'
)

s$browse(1)

It works and continues to work after stopping and restarting s

But if I close R and start a new R session (all the objects are restored from .RData) and try

library(Rook)

s$start()
s$browse(1)

then I get this error  in  the browser


"Only NEWS and URLs under /doc and /library are allowed "


Is this normal? What is the correct way to run rook apps in a new R session?  I have googled about it and all I found was a comment in this http://jeffreyhorner.tumblr.com/post/33814488298/deploy-rook-apps-part-ii  But I have no idea how he eventually solved his problem. I am very new to this and I am also not sure how to run the script and where (I think this is to workaround "this version of rook only listen to loopback devices" warning and may be related to the problem at hand) Please help.

P.S
I just submitted a post but it seems to have disappeared, sorry if this is a double posting.



Jeffrey Horner

unread,
Aug 11, 2015, 5:01:59 PM8/11/15
to rr...@googlegroups.com
Hi Bernard, 

You shouldn't save the s object because there's internal state that relative only to the currently running R session.

Just recreate it every time you start R.

Jeff

--
You received this message because you are subscribed to the Google Groups "rRook" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rrook+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages