{
  "id": 402144,
  "title": "I am new to kaggle, how can  I submit submission.csv using API.",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/402144",
  "author_name": "",
  "post_date": "2023-04-17T05:10:53.149747Z",
  "votes": 4,
  "comment_count": 8,
  "views": 0,
  "content": "<p>I didn't find any code example for Submission using R, can someone show how I can  do it.</p>",
  "messages": [
    {
      "id": "2224202",
      "postDate": "04/17/2023 05:10:53",
      "content": "<p>I didn't find any code example for Submission using R, can someone show how I can  do it.</p>",
      "rawMarkdown": "I didn't find any code example for Submission using R, can someone show how I can  do it.",
      "votes": null
    },
    {
      "id": "2224382",
      "postDate": "04/17/2023 09:00:21",
      "content": "<p><code>install.packages (“kaggle”)</code> first install the package.<br>\nYour Kaggle API key is under the “Create New API Token” button. You need to save this file as kaggle.json and place it in a folder called .kaggle in your home directory. <br>\nThen, use the kaggle_submit () function from the kaggle package to submit. For example:<br>\n<code>library (kaggle)</code><br>\n<code>kaggle_submit (competition = “titanic”, file = “submission.csv”, message = “submission”)</code></p>",
      "rawMarkdown": "`install.packages (“kaggle”)` first install the package.\nYour Kaggle API key is under the “Create New API Token” button. You need to save this file as kaggle.json and place it in a folder called .kaggle in your home directory. \nThen, use the kaggle_submit () function from the kaggle package to submit. For example:\n`library (kaggle) `\n`kaggle_submit (competition = “titanic”, file = “submission.csv”, message = “submission”)`",
      "votes": null
    },
    {
      "id": "2226386",
      "postDate": "04/18/2023 21:57:31",
      "content": "<p>Hey! </p>\n<p>Follow these steps:</p>\n<ul>\n<li>Installing and importing the Kaggle API</li>\n</ul>\n<pre><code>install.packages(\"kaggle\")\nlibrary(kaggle)\n</code></pre>\n<ul>\n<li>Set up your API credentials (you can find your API key in acount settings)</li>\n</ul>\n<pre><code>Sys.setenv(\"KAGGLE_USERNAME\" = \"your_username\")\nSys.setenv(\"KAGGLE_KEY\" = \"your_api_key\")\n</code></pre>\n<ul>\n<li>Specify the competition name and path to your <code>submission.csv</code> file</li>\n</ul>\n<pre><code>competition &lt;- \"name-of-competition\"\nsubmission_path &lt;- \"path/to/submission.csv\"\n</code></pre>\n<ul>\n<li>Submit your predictions file and get response from the API</li>\n</ul>\n<pre><code>submit_result &lt;- kaggle_submit(\n  competition = competition, \n  submission_file = submission_path, \n  message = \"My Kaggle submission\"\n)\nprint(submit_result)\n</code></pre>\n<p>Let me know if you still have any issues.</p>\n<p>The Devastator.</p>",
      "rawMarkdown": "Hey! \n\nFollow these steps:\n\n- Installing and importing the Kaggle API\n```\ninstall.packages(\"kaggle\")\nlibrary(kaggle)\n```\n\n- Set up your API credentials (you can find your API key in acount settings)\n```\nSys.setenv(\"KAGGLE_USERNAME\" = \"your_username\")\nSys.setenv(\"KAGGLE_KEY\" = \"your_api_key\")\n```\n\n- Specify the competition name and path to your `submission.csv` file\n```\ncompetition <- \"name-of-competition\"\nsubmission_path <- \"path/to/submission.csv\"\n```\n\n- Submit your predictions file and get response from the API\n```\nsubmit_result <- kaggle_submit(\n  competition = competition, \n  submission_file = submission_path, \n  message = \"My Kaggle submission\"\n)\nprint(submit_result)\n```\n\nLet me know if you still have any issues.\n\nThe Devastator.",
      "votes": null
    },
    {
      "id": "2226764",
      "postDate": "04/19/2023 07:40:12",
      "content": "<p>I am this kind of error showing that kaggle package is not available<br>\n Installing package into ‘/usr/local/lib/R/site-library’<br>\n(as ‘lib’ is unspecified)</p>\n<p>Warning message:<br>\n“package ‘kaggle’ is not available for this version of R</p>\n<p>A version of this package for your version of R might be available elsewhere,<br>\nsee the ideas at<br>\n<a href=\"https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages”\" target=\"_blank\">https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages”</a><br>\nERROR<br>\nError in library(kaggle): there is no package called ‘kaggle’</p>",
      "rawMarkdown": "I am this kind of error showing that kaggle package is not available\n Installing package into ‘/usr/local/lib/R/site-library’\n(as ‘lib’ is unspecified)\n\nWarning message:\n“package ‘kaggle’ is not available for this version of R\n\nA version of this package for your version of R might be available elsewhere,\nsee the ideas at\nhttps://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages”\nERROR\nError in library(kaggle): there is no package called ‘kaggle’",
      "votes": null
    },
    {
      "id": "2227715",
      "postDate": "04/20/2023 01:17:16",
      "content": "<p>try updating your R version or check this source: <a href=\"https://r-coder.com/install-r-packages/\" target=\"_blank\">https://r-coder.com/install-r-packages/</a></p>",
      "rawMarkdown": "try updating your R version or check this source: https://r-coder.com/install-r-packages/",
      "votes": null
    },
    {
      "id": "2228030",
      "postDate": "04/20/2023 07:55:24",
      "content": "<p>I couldn't do it either. Thanks for asking the question.</p>",
      "rawMarkdown": "I couldn't do it either. Thanks for asking the question.",
      "votes": null
    },
    {
      "id": "2231095",
      "postDate": "04/23/2023 05:12:08",
      "content": "<p>But I am doing it on the kaggle notebook. </p>",
      "rawMarkdown": "But I am doing it on the kaggle notebook.",
      "votes": null
    },
    {
      "id": "2235461",
      "postDate": "04/26/2023 04:22:44",
      "content": "<p><a href=\"https://www.kaggle.com/competitions/predict-student-performance-from-game-play\" target=\"_blank\">https://www.kaggle.com/competitions/predict-student-performance-from-game-play</a>. You can submit your predictions using the code and files provided in this note book. You can do it by changing the input submission mutate to predict by your model. </p>",
      "rawMarkdown": "https://www.kaggle.com/competitions/predict-student-performance-from-game-play. You can submit your predictions using the code and files provided in this note book. You can do it by changing the input submission mutate to predict by your model.",
      "votes": null
    },
    {
      "id": "2265080",
      "postDate": "05/19/2023 01:08:45",
      "content": "<p>Thank you for your question! It really helps.</p>",
      "rawMarkdown": "Thank you for your question! It really helps.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2224382,
      "author_name": "yus002",
      "author_url": "",
      "post_date": "04/17/2023 09:00:21",
      "content": "<p><code>install.packages (“kaggle”)</code> first install the package.<br>\nYour Kaggle API key is under the “Create New API Token” button. You need to save this file as kaggle.json and place it in a folder called .kaggle in your home directory. <br>\nThen, use the kaggle_submit () function from the kaggle package to submit. For example:<br>\n<code>library (kaggle)</code><br>\n<code>kaggle_submit (competition = “titanic”, file = “submission.csv”, message = “submission”)</code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2226386,
      "author_name": "thedevastator",
      "author_url": "",
      "post_date": "04/18/2023 21:57:31",
      "content": "<p>Hey! </p>\n<p>Follow these steps:</p>\n<ul>\n<li>Installing and importing the Kaggle API</li>\n</ul>\n<pre><code>install.packages(\"kaggle\")\nlibrary(kaggle)\n</code></pre>\n<ul>\n<li>Set up your API credentials (you can find your API key in acount settings)</li>\n</ul>\n<pre><code>Sys.setenv(\"KAGGLE_USERNAME\" = \"your_username\")\nSys.setenv(\"KAGGLE_KEY\" = \"your_api_key\")\n</code></pre>\n<ul>\n<li>Specify the competition name and path to your <code>submission.csv</code> file</li>\n</ul>\n<pre><code>competition &lt;- \"name-of-competition\"\nsubmission_path &lt;- \"path/to/submission.csv\"\n</code></pre>\n<ul>\n<li>Submit your predictions file and get response from the API</li>\n</ul>\n<pre><code>submit_result &lt;- kaggle_submit(\n  competition = competition, \n  submission_file = submission_path, \n  message = \"My Kaggle submission\"\n)\nprint(submit_result)\n</code></pre>\n<p>Let me know if you still have any issues.</p>\n<p>The Devastator.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2226764,
          "author_name": "pranavatote",
          "author_url": "",
          "post_date": "04/19/2023 07:40:12",
          "content": "<p>I am this kind of error showing that kaggle package is not available<br>\n Installing package into ‘/usr/local/lib/R/site-library’<br>\n(as ‘lib’ is unspecified)</p>\n<p>Warning message:<br>\n“package ‘kaggle’ is not available for this version of R</p>\n<p>A version of this package for your version of R might be available elsewhere,<br>\nsee the ideas at<br>\n<a href=\"https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages”\" target=\"_blank\">https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages”</a><br>\nERROR<br>\nError in library(kaggle): there is no package called ‘kaggle’</p>",
          "votes": null,
          "replies": [
            {
              "id": 2227715,
              "author_name": "yus002",
              "author_url": "",
              "post_date": "04/20/2023 01:17:16",
              "content": "<p>try updating your R version or check this source: <a href=\"https://r-coder.com/install-r-packages/\" target=\"_blank\">https://r-coder.com/install-r-packages/</a></p>",
              "votes": null,
              "replies": [
                {
                  "id": 2231095,
                  "author_name": "pranavatote",
                  "author_url": "",
                  "post_date": "04/23/2023 05:12:08",
                  "content": "<p>But I am doing it on the kaggle notebook. </p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "id": 2228030,
      "author_name": "risakashiwabara",
      "author_url": "",
      "post_date": "04/20/2023 07:55:24",
      "content": "<p>I couldn't do it either. Thanks for asking the question.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2235461,
          "author_name": "pranavatote",
          "author_url": "",
          "post_date": "04/26/2023 04:22:44",
          "content": "<p><a href=\"https://www.kaggle.com/competitions/predict-student-performance-from-game-play\" target=\"_blank\">https://www.kaggle.com/competitions/predict-student-performance-from-game-play</a>. You can submit your predictions using the code and files provided in this note book. You can do it by changing the input submission mutate to predict by your model. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2265080,
      "author_name": "ariahu",
      "author_url": "",
      "post_date": "05/19/2023 01:08:45",
      "content": "<p>Thank you for your question! It really helps.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2224202": "I didn't find any code example for Submission using R, can someone show how I can  do it.",
    "2224382": "`install.packages (“kaggle”)` first install the package.\nYour Kaggle API key is under the “Create New API Token” button. You need to save this file as kaggle.json and place it in a folder called .kaggle in your home directory. \nThen, use the kaggle_submit () function from the kaggle package to submit. For example:\n`library (kaggle) `\n`kaggle_submit (competition = “titanic”, file = “submission.csv”, message = “submission”)`",
    "2226386": "Hey! \n\nFollow these steps:\n\n- Installing and importing the Kaggle API\n```\ninstall.packages(\"kaggle\")\nlibrary(kaggle)\n```\n\n- Set up your API credentials (you can find your API key in acount settings)\n```\nSys.setenv(\"KAGGLE_USERNAME\" = \"your_username\")\nSys.setenv(\"KAGGLE_KEY\" = \"your_api_key\")\n```\n\n- Specify the competition name and path to your `submission.csv` file\n```\ncompetition <- \"name-of-competition\"\nsubmission_path <- \"path/to/submission.csv\"\n```\n\n- Submit your predictions file and get response from the API\n```\nsubmit_result <- kaggle_submit(\n  competition = competition, \n  submission_file = submission_path, \n  message = \"My Kaggle submission\"\n)\nprint(submit_result)\n```\n\nLet me know if you still have any issues.\n\nThe Devastator.",
    "2226764": "I am this kind of error showing that kaggle package is not available\n Installing package into ‘/usr/local/lib/R/site-library’\n(as ‘lib’ is unspecified)\n\nWarning message:\n“package ‘kaggle’ is not available for this version of R\n\nA version of this package for your version of R might be available elsewhere,\nsee the ideas at\nhttps://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages”\nERROR\nError in library(kaggle): there is no package called ‘kaggle’",
    "2227715": "try updating your R version or check this source: https://r-coder.com/install-r-packages/",
    "2228030": "I couldn't do it either. Thanks for asking the question.",
    "2231095": "But I am doing it on the kaggle notebook.",
    "2235461": "https://www.kaggle.com/competitions/predict-student-performance-from-game-play. You can submit your predictions using the code and files provided in this note book. You can do it by changing the input submission mutate to predict by your model.",
    "2265080": "Thank you for your question! It really helps."
  },
  "source": "meta"
}