{
  "id": 580532,
  "title": "Re_POST of HOW to deal with memory in R? ",
  "url": "/competitions/drw-crypto-market-prediction/discussion/580532",
  "author_name": "",
  "post_date": "2025-05-24T17:41:07.891097300Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>:( doing extensive matrix operations and it is killing the kernel everytime..!</p>",
  "messages": [
    {
      "id": "3208788",
      "postDate": "05/24/2025 17:41:07",
      "content": "<p>:( doing extensive matrix operations and it is killing the kernel everytime..!</p>",
      "rawMarkdown": ":( doing extensive matrix operations and it is killing the kernel everytime..!",
      "votes": null
    },
    {
      "id": "3209000",
      "postDate": "05/25/2025 04:53:46",
      "content": "<p>Use pryr::mem_used() or utils::object.size() to track memory.</p>\n<p>profvis::profvis() for profiling memory and CPU usage.</p>",
      "rawMarkdown": "Use pryr::mem_used() or utils::object.size() to track memory.\n\nprofvis::profvis() for profiling memory and CPU usage.",
      "votes": null
    },
    {
      "id": "3211368",
      "postDate": "05/28/2025 10:53:19",
      "content": "<p>You can convert float types to numeric, similar to what people did in Python:</p>\n<pre><code>train_df &lt;- train_df %&gt;%\n  mutate(across((.double), ~ .numeric(.)))\ntest_df &lt;- test_df %&gt;%\n  mutate(across((.double), ~ .numeric(.)))\n</code></pre>",
      "rawMarkdown": "You can convert float types to numeric, similar to what people did in Python:\n\n```\ntrain_df <- train_df %>%\n  mutate(across(where(is.double), ~ as.numeric(.)))\ntest_df <- test_df %>%\n  mutate(across(where(is.double), ~ as.numeric(.)))\n```",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3209000,
      "author_name": "sumit08",
      "author_url": "",
      "post_date": "05/25/2025 04:53:46",
      "content": "<p>Use pryr::mem_used() or utils::object.size() to track memory.</p>\n<p>profvis::profvis() for profiling memory and CPU usage.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3211368,
      "author_name": "dalloliogm",
      "author_url": "",
      "post_date": "05/28/2025 10:53:19",
      "content": "<p>You can convert float types to numeric, similar to what people did in Python:</p>\n<pre><code>train_df &lt;- train_df %&gt;%\n  mutate(across((.double), ~ .numeric(.)))\ntest_df &lt;- test_df %&gt;%\n  mutate(across((.double), ~ .numeric(.)))\n</code></pre>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3208788": ":( doing extensive matrix operations and it is killing the kernel everytime..!",
    "3209000": "Use pryr::mem_used() or utils::object.size() to track memory.\n\nprofvis::profvis() for profiling memory and CPU usage.",
    "3211368": "You can convert float types to numeric, similar to what people did in Python:\n\n```\ntrain_df <- train_df %>%\n  mutate(across(where(is.double), ~ as.numeric(.)))\ntest_df <- test_df %>%\n  mutate(across(where(is.double), ~ as.numeric(.)))\n```"
  },
  "source": "meta"
}