Partial plots not working properly in Shiny R

34 views
Skip to first unread message

bharat mantha

unread,
May 30, 2016, 7:37:48 AM5/30/16
to ShinyApps Users
Hi 
I have a predictive analytics application in Shiny that uses Random forest for partial plots.
But I have the following issue:

The partial plot function gives a flat line for one of the variables when using inside a for loop.
For example:

1. partialPlot(fit1, full data ,"x")--------------- works fine

but if i do the same thing inside a loop

2. for ( i in levels)

{

partialPlot(fit1, data in i ,"x")-------------- gives a flat line.


}

3. when I isloated the data per each level separately and ran

partialPlot(fit1, data in i ,"x")--------------- works fine !


Whats happening here? 
 

Tareef Kawaf

unread,
May 30, 2016, 2:40:16 PM5/30/16
to bharat mantha, ShinyApps Users
Bharat , do you see the same issue when you run this locally on tour own machine?
--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/1c864147-7daa-439d-8d85-7f537bc04dd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bharat mantha

unread,
May 30, 2016, 5:07:03 PM5/30/16
to Tareef Kawaf, ShinyApps Users
Yes. It's the same issue. I have my thesis defense om 13. I was showing you could help me. 
--
Sent from Gmail Mobile

Tareef Kawaf

unread,
May 31, 2016, 6:07:31 AM5/31/16
to bharat mantha, ShinyApps Users
It sounds like this is more of an R question. Unfortunately I don't think this is the right mailing list for those types of questions. This discussion list is for shinyapps.io related questions.  I would list your question to stack overflow and see if anyone in the community can help.  

Wish I had better news for you. 

bharat mantha

unread,
May 31, 2016, 3:15:58 PM5/31/16
to Tareef Kawaf, ShinyApps Users
It is not an R question. The code runs in R perfectly but doesn't in shiny R. It is related to the shiny app I created 
--
--
Bharat Mantha
Graduate student 
Department of Petroleum Engineering
University of Houston
 

Tareef Kawaf

unread,
May 31, 2016, 7:30:10 PM5/31/16
to bharat mantha, ShinyApps Users
Sorry Bharat, what I meant to say is that this is a general shiny/R question not one that is specific to shinyapps.io.  I would reach out to the shiny-discuss list if you believe it is a shiny related issue, but I suspect that the best thing to do would be to try and decompose the application down into the component calls and see if you get the right plots if you run them by hand.  Unfortunately this discussion list can only help with issues relating to questions/issues relating to running on shinyapps.io and not general R or Shiny programming questions.


Reply all
Reply to author
Forward
0 new messages