Forum Discussion

LiamRall's avatar
LiamRall
Frequent Visitor
5 years ago

R Script Editor isn't automatically populating the data frame with my values.

Hi there,

 

I am trying to create a custom visual with the R script functionality. I have R installed as well as R studio. When I add my fields to the values pane of the R visual, it does not create the data frame as it is meant to. The image below should better explain my problem.

If anyone knows why this is happening then any help would be much appreciated.

 

Thanks

5 Replies

  • Hi LiamRall ,

     

    When you use a R script visual, you need to write somethng in the script area. Currently there is nothing in your script area except the automated commented lines.

    Also R visual can be used to plot a visual rather than outputting a dataframe directly. Something like below:

     

    Thanks,

    Pragati

    • LiamRall's avatar
      LiamRall
      Frequent Visitor

      Hi Pragati11

       

      Thank you for your response!

       

      I can plot things in the script. So if I type plot(1,1) a visual does come up. My problem is that I don't have access to my values because the automatic code is not creating a data.frame for me to use. 

      I feel like the automatic code should generate something like:

      dataset <- data.framed(Year, Quarter, Month, Day, Client Count)

       

      I hope this helps.