-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutate each crashes R in newest dplyr #1228
Comments
I report same issue: mutate fails when enclosed within a code chunk of an .Rmd file. R script appears to be functioning OK Additional context: mutating within Slidify framework. Removed dplyr(0.4.2); executed the following command: Previous Rmd files running fine within Slidify. Note: I executed an Update from within RStudio to the packages, so a whole list of libraries were updated. Backing out this dplyr(0.4.2) seems to have me back up and running. |
FWIW: I'm seeing similar problems (segfaults, memory allocation problems) in project that has been passing wercker and travis CI builds until the new version of dplyr (0.4.2) was released. |
@romainfrancois could you please take a look? |
I am having the same trouble. It's in a function that I didn't write and hadn't really reviewed until it caused this segfault on Travis. The function on our end is really ugly and I'm refactoring it. Ugly thought it may be, the code should run w/o a segfault. This code has been there for several months, with no problem passing tests locally or on Travis. Here's one of my failed Travis builds: FWIW it does seem related to size of the data.frame. When I was trying to debug interactively, I could get the segfault with full input but not with head(input). |
I have an unintentional natural experiment where my package builds successfully on Travis in master, which is using the old style of Sorry I can't be more precise but maybe that gives some information? |
I have also experienced problems with But, a MWE, that simulates my actual dataset I have (44 columns, 500 rows).
|
Same problem occurred in my computer, with the code below (same as takje's except larger size <- 1000000
prices <- data.frame(time=seq(now(),now()+size-1,by=1), A=runif(size),B=runif(size),C=runif(size))
BaseloadPrice <- prices %>%
ungroup() %>%
mutate_each(funs(ifelse(.>300,300,.)),-time) Weird, it seems like not occurred every time, but more frequent when the progress bar shows... It may be some problems related to that...
|
Same issue here with a 100k rows dataframe containing several columns with dates stored as strings. parse_dirty_string_to_date <- function(x) {
str_replace_all(x, fixed("."),"-") %>%
mdy(tz='CET') %>% as.Date(tz='CET')
}
mc %>% mutate(funs(parse_dirty_string_to_date), ends_with("Dt")) I tried replacing my mutate_each statements with mutate, but that also crashes R. mc %>% mutate(ReportDt = parse_dirty_string_to_date(ReportDt),
TransDt = parse_dirty_string_to_date(TransDt)) this works though mc$TransDt <- parse_dirty_string_to_date(mc$TransDt)
mc$ReportDt <- parse_dirty_string_to_date(mc$ReportDt) Sessioninfo R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=Swedish_Sweden.1252 LC_CTYPE=Swedish_Sweden.1252 LC_MONETARY=Swedish_Sweden.1252 LC_NUMERIC=C LC_TIME=Swedish_Sweden.1252
attached base packages:
[1] tcltk stats graphics grDevices utils datasets methods base
other attached packages:
[1] sqldf_0.4-10 RSQLite_1.0.0 DBI_0.3.1 gsubfn_0.6-6 proto_0.3-10 ISOcodes_2015.04.04 jsonlite_0.9.16 bit64_0.9-4 bit_1.1-12
[10] xtable_1.7-4 RODBC_1.3-11 lubridate_1.3.3 magrittr_1.5 data.table_1.9.4 stringr_1.0.0 dplyr_0.4.2 DiagrammeR_0.7 knitr_1.10.5
loaded via a namespace (and not attached):
[1] Rcpp_0.11.6 rstudioapi_0.3.1 R6_2.0.1 highr_0.5 plyr_1.8.3 tools_3.2.1 parallel_3.2.1 htmltools_0.2.6 lazyeval_0.1.10 yaml_2.1.13 assertthat_0.1
[12] digest_0.6.8 reshape2_1.4.1 htmlwidgets_0.5 curl_0.9 memoise_0.2.1 rmarkdown_0.7 stringi_0.5-5 chron_2.3-47 |
No need to keep adding examples. We know about the problem. |
I think those are all the same as #1231. So I'm closing |
Hi,
This piece of code worked before but now crashes my R sessions when the data frame is too large:
Sessioninfo:
Update
This code works for now:
The text was updated successfully, but these errors were encountered: