Practical Predictive Analytics
上QQ阅读APP看书,第一时间看更新

Setting up your project and subfolders

We will start by creating folders for our environment. Often projects start with three subfolders which roughly correspond to:

  • Data source
  • Code-generated outputs
  • The code itself (in this case, R)

There may be more in certain cases, but let’s keep it simple:

  • First, decide where you will be housing your projects. Then create a sub-directory and name it PracticalPredictiveAnalytics. For this example, we will create the directory under Windows drive C.
  • Create three subdirectories under this project: Data, Outputs, and R:
    • The R directory will hold all of our data prep code, algorithms, and so on.
    • The Data directory will contain our raw data sources that will typically be read in by our programs.
    • The Outputs directory will contain anything generated by the code. That can include plots, tables, listings, and output from the log.

Here is an example of how the structure will look after you have created the folders: