2016-08-16 3 views
1

最近、RStudioを3.3.1にアップデートしました。それ以来、dplyrを使用して次のコードを実行すると、Rは「このアプリケーションはRuntimeに異常な方法で終了するよう要求しました"R 3.3.1 dplyrでクラッシュする

max_trop <- df %>% group_by(record_id) %>% summarise(max= max(troponin, na.rm=TRUE)) 

私が何か特に愚かなことをしているのか誰にでも教えてくれますか?これは、正常に動作するために使用...

感謝

のSessionInfo()

R version 3.3.1 (2016-06-21)Platform: i386-w64-mingw32/i386 (32-bit) 
Running under: Windows 7 x64 (build 7601) Service Pack 1 
locale:[1] LC_COLLATE=English_United Kingdom.1252 
LC_CTYPE=English_United Kingdom.1252 
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C 
[5] LC_TIME=English_United Kingdom.1252  

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base  

other attached packages: 
[1] dplyr_0.5.0 

loaded via a namespace (and not attached): 
[1] magrittr_1.5 R6_2.1.2  assertthat_0.1 DBI_0.4-1  
tools_3.3.1  tibble_1.1  Rcpp_0.12.6 
+0

あなたのsessionInfo()を投稿する –

+0

group_by()およびsummarize()で指定された各変数がデータセットに存在することは確かですか?私はdplyrで動作する変数名を誤って入力するとRStudioがクラッシュする。 –

+0

3.3.1はRバージョンです。 Rstudioの最新バージョンを使用していますか? (問題はないはずですが、...) –

答えて

2

これはdplyrチェーンで間違った変数名を取得することによって引き起こされる可能性があります。解決策は、データセットに存在する変数で提供しているものを確認することです。

data("mtcars") 
library(dplyr) 

# Runs 
mtcars %>% summarise(mean(mpg)) 

# crashes with message 'This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.' 
mtcars %>% summarise(mean(mag)) 
+0

ありがとう@ r.bot。変数名は間違いなく、以前は同じデータセットで動作していました – Annemarie

+0

私はそれを修正しました。最初のトロポニンがいくつかのレコードで欠けているので、動作していなかったと思います。それが実行されているこれらのレコードを削除しました。しかし、それは欠けている値で前に働いていたので、なぜそれが混乱したのか混乱しています。 – Annemarie

関連する問題