{
  "id": 248696,
  "title": "Making Submission with R code",
  "url": "/competitions/mlb-player-digital-engagement-forecasting/discussion/248696",
  "author_name": "",
  "post_date": "2021-06-24T14:07:44.501694200Z",
  "votes": 1,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Are there any examples of how to make a submission if we are using R instead of python?</p>",
  "messages": [
    {
      "id": "1363976",
      "postDate": "06/24/2021 14:07:44",
      "content": "<p>Are there any examples of how to make a submission if we are using R instead of python?</p>",
      "rawMarkdown": "Are there any examples of how to make a submission if we are using R instead of python?",
      "votes": null
    },
    {
      "id": "1364164",
      "postDate": "06/24/2021 17:05:17",
      "content": "<p><a href=\"https://www.kaggle.com/mcw0089\" target=\"_blank\">@mcw0089</a> here's a <a href=\"https://www.kaggle.com/wcukierski/submitting-using-mlb-module-in-r\" target=\"_blank\">quick example</a> of how to use the module with R and the reticulate package</p>",
      "rawMarkdown": "mcw0089 here's a [quick example](https://www.kaggle.com/wcukierski/submitting-using-mlb-module-in-r) of how to use the module with R and the reticulate package",
      "votes": null
    },
    {
      "id": "1367656",
      "postDate": "06/28/2021 02:19:36",
      "content": "<p>Thanks for responding but the example you supplied is a bit unclear. Still not sure how this is done in R.</p>",
      "rawMarkdown": "Thanks for responding but the example you supplied is a bit unclear. Still not sure how this is done in R.",
      "votes": null
    },
    {
      "id": "1369701",
      "postDate": "06/29/2021 14:16:27",
      "content": "<p><a href=\"https://www.kaggle.com/wcukierski\" target=\"_blank\">@wcukierski</a>  In your example, if you check for unique dates as the it iterates through, you will see that the dates are not unique. See the example here:<br>\n<a href=\"https://www.kaggle.com/mcw0089/submitting-using-mlb-module-in-r\" target=\"_blank\">https://www.kaggle.com/mcw0089/submitting-using-mlb-module-in-r</a></p>\n<p>However, for the python version those same dates are unique.</p>",
      "rawMarkdown": "wcukierski  In your example, if you check for unique dates as the it iterates through, you will see that the dates are not unique. See the example here:\nhttps://www.kaggle.com/mcw0089/submitting-using-mlb-module-in-r\n\nHowever, for the python version those same dates are unique.",
      "votes": null
    },
    {
      "id": "1369743",
      "postDate": "06/29/2021 14:45:42",
      "content": "<p>The columns of the prediction dataframe are</p>\n<pre><code>date_playerId,target1,target2,target3,target4\n</code></pre>\n<p>When you are calling <code>pred_df$date</code> it is giving you the values of <code>pred_df$date_playerId</code> because R tries to be \"helpful\" by supporting partial name matching (<a href=\"https://stackoverflow.com/questions/48525972/list-members-can-be-accessed-with-partial-name-is-this-a-feature)\" target=\"_blank\">https://stackoverflow.com/questions/48525972/list-members-can-be-accessed-with-partial-name-is-this-a-feature)</a>.</p>",
      "rawMarkdown": "The columns of the prediction dataframe are\n```\ndate_playerId,target1,target2,target3,target4\n```\nWhen you are calling `pred_df$date` it is giving you the values of `pred_df$date_playerId` because R tries to be \"helpful\" by supporting partial name matching (https://stackoverflow.com/questions/48525972/list-members-can-be-accessed-with-partial-name-is-this-a-feature).",
      "votes": null
    },
    {
      "id": "1369832",
      "postDate": "06/29/2021 16:31:23",
      "content": "<p><a href=\"https://www.kaggle.com/wcukierski\" target=\"_blank\">@wcukierski</a>  I don't quite think that is the problem. Now I have a better understanding of what is going on. In python, the date is accessible as the index. However, in R there is no such index to access. I will just extract the date from the date_playerId column.</p>\n<p>Your feedback was extremely helpful. Thank you for helping.</p>",
      "rawMarkdown": "wcukierski  I don't quite think that is the problem. Now I have a better understanding of what is going on. In python, the date is accessible as the index. However, in R there is no such index to access. I will just extract the date from the date_playerId column.\n\nYour feedback was extremely helpful. Thank you for helping.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1364164,
      "author_name": "wcukierski",
      "author_url": "",
      "post_date": "06/24/2021 17:05:17",
      "content": "<p><a href=\"https://www.kaggle.com/mcw0089\" target=\"_blank\">@mcw0089</a> here's a <a href=\"https://www.kaggle.com/wcukierski/submitting-using-mlb-module-in-r\" target=\"_blank\">quick example</a> of how to use the module with R and the reticulate package</p>",
      "votes": null,
      "replies": [
        {
          "id": 1369701,
          "author_name": "mcw0089",
          "author_url": "",
          "post_date": "06/29/2021 14:16:27",
          "content": "<p><a href=\"https://www.kaggle.com/wcukierski\" target=\"_blank\">@wcukierski</a>  In your example, if you check for unique dates as the it iterates through, you will see that the dates are not unique. See the example here:<br>\n<a href=\"https://www.kaggle.com/mcw0089/submitting-using-mlb-module-in-r\" target=\"_blank\">https://www.kaggle.com/mcw0089/submitting-using-mlb-module-in-r</a></p>\n<p>However, for the python version those same dates are unique.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1369743,
          "author_name": "wcukierski",
          "author_url": "",
          "post_date": "06/29/2021 14:45:42",
          "content": "<p>The columns of the prediction dataframe are</p>\n<pre><code>date_playerId,target1,target2,target3,target4\n</code></pre>\n<p>When you are calling <code>pred_df$date</code> it is giving you the values of <code>pred_df$date_playerId</code> because R tries to be \"helpful\" by supporting partial name matching (<a href=\"https://stackoverflow.com/questions/48525972/list-members-can-be-accessed-with-partial-name-is-this-a-feature)\" target=\"_blank\">https://stackoverflow.com/questions/48525972/list-members-can-be-accessed-with-partial-name-is-this-a-feature)</a>.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1369832,
          "author_name": "mcw0089",
          "author_url": "",
          "post_date": "06/29/2021 16:31:23",
          "content": "<p><a href=\"https://www.kaggle.com/wcukierski\" target=\"_blank\">@wcukierski</a>  I don't quite think that is the problem. Now I have a better understanding of what is going on. In python, the date is accessible as the index. However, in R there is no such index to access. I will just extract the date from the date_playerId column.</p>\n<p>Your feedback was extremely helpful. Thank you for helping.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1367656,
      "author_name": "mcw0089",
      "author_url": "",
      "post_date": "06/28/2021 02:19:36",
      "content": "<p>Thanks for responding but the example you supplied is a bit unclear. Still not sure how this is done in R.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1363976": "Are there any examples of how to make a submission if we are using R instead of python?",
    "1364164": "mcw0089 here's a [quick example](https://www.kaggle.com/wcukierski/submitting-using-mlb-module-in-r) of how to use the module with R and the reticulate package",
    "1367656": "Thanks for responding but the example you supplied is a bit unclear. Still not sure how this is done in R.",
    "1369701": "wcukierski  In your example, if you check for unique dates as the it iterates through, you will see that the dates are not unique. See the example here:\nhttps://www.kaggle.com/mcw0089/submitting-using-mlb-module-in-r\n\nHowever, for the python version those same dates are unique.",
    "1369743": "The columns of the prediction dataframe are\n```\ndate_playerId,target1,target2,target3,target4\n```\nWhen you are calling `pred_df$date` it is giving you the values of `pred_df$date_playerId` because R tries to be \"helpful\" by supporting partial name matching (https://stackoverflow.com/questions/48525972/list-members-can-be-accessed-with-partial-name-is-this-a-feature).",
    "1369832": "wcukierski  I don't quite think that is the problem. Now I have a better understanding of what is going on. In python, the date is accessible as the index. However, in R there is no such index to access. I will just extract the date from the date_playerId column.\n\nYour feedback was extremely helpful. Thank you for helping."
  },
  "source": "meta"
}