{"cells":[
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": false
  },
  "outputs": [],
  "source": "# This R environment comes with all of CRAN preinstalled, as well as many other helpful packages\n# The environment is defined by the kaggle/rstats docker image: https://github.com/kaggle/docker-rstats\n# For example, here's several helpful packages to load in \n\nlibrary(ggplot2) # Data visualization\nlibrary(readr) # CSV file I/O, e.g. the read_csv function\n\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n\nsystem(\"ls ../input\")\n\nsuppressPackageStartupMessages({\nrequire(\"data.table\");\nrequire(\"ggplot2\");\nrequire(\"dplyr\");\nrequire(\"tidyr\");\n})\n\n# Any results you write to the current directory are saved as output.\n\ntrain <- fread(\"../input/train.csv\",header=TRUE,colClasses = c(rep(\"integer\",7),rep(c(\"numeric\",\"integer\"),2)))\n\nsample_products <- sample(unique(train[,Producto_ID]),10)\nsample_train <- train[Producto_ID %in% sample_products]\n\nsample_train[,Match:=(Venta_uni_hoy-Dev_uni_proxima)==Demanda_uni_equil]"
 }
],"metadata":{"kernelspec":{"display_name":"R","language":"R","name":"ir"}}, "nbformat": 4, "nbformat_minor": 0}