Search code examples
rcart-analysis

Follow example on R decision example


I am looking at R decision trees and found this tutorial which is somewhat what i need, almost the exact thing i need.

So : http://www.r-bloggers.com/using-r-for-a-salary-negotiation-an-extension-of-decision-tree-models/

Could someone please guide me to how can i implement this project? To be frank, i just copied and pasted the code into R and it gave me errors, like:

object 'xseq' not found

I'd appreciate your help very much! Thank you!


Solution

  • The errors stem from the line:

      }     yseq <- payoff(xseq)   # plots
    

    You should change this to:

      };     yseq <- payoff(xseq)   # plots
    

    or

      }
     yseq <- payoff(xseq)   # plots