{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/dplyr/issues/1228","labels_url":"https://api.github.com/repos/hadley/dplyr/issues/1228/labels{/name}","comments_url":"https://api.github.com/repos/hadley/dplyr/issues/1228/comments","events_url":"https://api.github.com/repos/hadley/dplyr/issues/1228/events","html_url":"https://github.com/hadley/dplyr/issues/1228","id":89501633,"number":1228,"title":"Mutate each crashes R in newest dplyr","user":{"login":"takje","id":6696142,"avatar_url":"https://avatars.githubusercontent.com/u/6696142?v=3","gravatar_id":"","url":"https://api.github.com/users/takje","html_url":"https://github.com/takje","followers_url":"https://api.github.com/users/takje/followers","following_url":"https://api.github.com/users/takje/following{/other_user}","gists_url":"https://api.github.com/users/takje/gists{/gist_id}","starred_url":"https://api.github.com/users/takje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takje/subscriptions","organizations_url":"https://api.github.com/users/takje/orgs","repos_url":"https://api.github.com/users/takje/repos","events_url":"https://api.github.com/users/takje/events{/privacy}","received_events_url":"https://api.github.com/users/takje/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-19T08:10:31Z","updated_at":"2015-06-30T04:49:53Z","closed_at":null,"body":"Hi,\r\n\r\nThis piece of code worked before but now crashes my R sessions when the data frame is too large:\r\n```\r\nrequire(dplyr)\r\nrequire(lubridate)\r\n\r\nsize <- 100000\r\nprices <- data.frame(time=seq(now(),now()+size-1,by=1), A=runif(size),B=runif(size),C=runif(size))\r\n\r\nBaseloadPrice <- prices %>%\r\n  ungroup() %>%\r\n  mutate_each(funs(ifelse(.>300,300,.)),-time)\r\n```\r\n\r\nSessioninfo:\r\n```\r\n> sessionInfo()\r\nR version 3.1.2 (2014-10-31)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\n\r\nlocale:\r\n[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   \r\n[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           \r\n[5] LC_TIME=English_United Kingdom.1252    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n[1] lubridate_1.3.3 dplyr_0.4.2    \r\n\r\nloaded via a namespace (and not attached):\r\n [1] assertthat_0.1 DBI_0.3.1      digest_0.6.8   magrittr_1.5   memoise_0.2.1  parallel_3.1.2\r\n [7] plyr_1.8.3     R6_2.0.1       Rcpp_0.11.6    stringi_0.4-1  stringr_1.0.0  tools_3.1.2   \r\n```\r\n\r\n**Update**\r\nThis code works for now:\r\n```\r\nrequire(dplyr)\r\nrequire(lubridate)\r\n\r\nsize <- 100000\r\nprices <- data.frame(time=seq(now(),now()+size-1,by=1), A=runif(size),B=runif(size),C=runif(size))\r\n\r\nBaseloadPrice <- prices %>%\r\n  ungroup() %>%\r\n  group_by(time) %>%\r\n  mutate_each(funs(min(.,300)),-time)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/hadley/dplyr/issues/comments/116955343","html_url":"https://github.com/hadley/dplyr/issues/1228#issuecomment-116955343","issue_url":"https://api.github.com/repos/hadley/dplyr/issues/1228","id":116955343,"user":{"login":"shrektan","id":8368933,"avatar_url":"https://avatars.githubusercontent.com/u/8368933?v=3","gravatar_id":"","url":"https://api.github.com/users/shrektan","html_url":"https://github.com/shrektan","followers_url":"https://api.github.com/users/shrektan/followers","following_url":"https://api.github.com/users/shrektan/following{/other_user}","gists_url":"https://api.github.com/users/shrektan/gists{/gist_id}","starred_url":"https://api.github.com/users/shrektan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrektan/subscriptions","organizations_url":"https://api.github.com/users/shrektan/orgs","repos_url":"https://api.github.com/users/shrektan/repos","events_url":"https://api.github.com/users/shrektan/events{/privacy}","received_events_url":"https://api.github.com/users/shrektan/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T04:49:52Z","updated_at":"2015-06-30T04:49:52Z","body":"Same problem occurred in my computer, with the code below (same as takje's except larger `size`):\r\n\r\n```r\r\nsize <- 1000000\r\nprices <- data.frame(time=seq(now(),now()+size-1,by=1), A=runif(size),B=runif(size),C=runif(size))\r\n\r\nBaseloadPrice <- prices %>%\r\n  ungroup() %>%\r\n  mutate_each(funs(ifelse(.>300,300,.)),-time)\r\n```\r\n\r\nWeird, it seems like not occurred every time, but more frequent when **the progress bar shows**... It may be some problems related to that...\r\n\r\n```\r\n> sessionInfo()\r\nR version 3.2.0 (2015-04-16)\r\nPlatform: i386-w64-mingw32/i386 (32-bit)\r\nRunning under: Windows 7 x64 (build 7601) Service Pack 1\r\n\r\nlocale:\r\n[1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 \r\n[2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936   \r\n[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936\r\n[4] LC_NUMERIC=C                                                   \r\n[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n[1] lubridate_1.3.3 dplyr_0.4.2    \r\n\r\nloaded via a namespace (and not attached):\r\n [1] plyr_1.8.3     magrittr_1.5   R6_2.0.1       assertthat_0.1\r\n [5] parallel_3.2.0 DBI_0.3.1      tools_3.2.0    memoise_0.2.1 \r\n [9] Rcpp_0.11.6    stringi_0.5-2  digest_0.6.8   stringr_1.0.0 \r\n```\r\n"}}