Forum Discussion

Paheli's avatar
Paheli
Frequent Visitor
8 years ago

Edit dataset using R visual

Hi!

i would like to know if we can edit dataset values by using R visual (and not R script in query)

For example : "dataset$values[i]=10" gives"unexpected input" as error

 

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Paheli,

     

    Based on error message, it think you inputted wrong script in r visual.

     

    You can try to use below formula to modify specific element from data frame:

    dataset[i,"values"] <- 10

     

    Reference link:

    R Data Frame

    R-intro

     

    Regards,

    Xiaoxin Sheng 

    • Paheli's avatar
      Paheli
      Frequent Visitor

      Anonymous thanks for your reply but nothing happen when excute the code 

      here below the screenshot:

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Paheli,

         

        According to your screenshots, I found you use '=' to replace '<-', I'm not so sure if character '=' can work as '<-' in r script.

        Maybe you can modify it and try again.

         

        Regards,
        Xiaoxin Sheng