2016-07-21 8 views
0

Ich versuchte nächster Code ausführen:Absturz Boruta Grundstück

doc.plot <- addPlot(doc = doc.plot, 
        fun = function() plot(Boruta.plot,las=2, 
              xlim = c(55,65)), 
        vector.graphic = TRUE) 

hat jedoch Rstudio fatale Fehler. xlim = c(55,65) ist Problemcode, weil ohne diese Teilplotfunktion gearbeitet wird. Reporter Version 0.8.6. Bitte helfen Sie diesen Fehler zu beheben.

+0

Erstellen Sie ein reproduzierbares Beispiel, um den Fehler reproduzieren zu lassen. Könnten Sie auch Ihr 'sessionInfo()' Ergebnis hinzufügen? –

Antwort

0
# Wrtie example for reporteRs crush 
library(Boruta) 
library(ReporteRs) 

# Create example data 
fact <- as.factor(c(rep(x = rbinom(50,1,0.5),2))) 
A <- rnorm(length(fact)) 
B <- rlnorm(length(fact)) 
C <- as.factor(rbinom(length(fact),size = 20,0.75)) 
example.data <- data.frame(fact,A,B,C) 
example.boruta <- Boruta(fact~., example.data) 
plot(example.boruta, las =2) 

sessionInfo() 
# R version 3.3.1 (2016-06-21) 
# Platform: x86_64-w64-mingw32/x64 (64-bit) 
# Running under: Windows >= 8 x64 (build 9200) 
# 
# locale: 
# [1] LC_COLLATE=Russian_Russia.1251 LC_CTYPE=Russian_Russia.1251 LC_MONETARY=Russian_Russia.1251 
# [4] LC_NUMERIC=C     LC_TIME=Russian_Russia.1251  
# 
# attached base packages: 
# [1] stats  graphics grDevices utils  datasets methods base  
# 
# other attached packages: 
# [1] ReporteRs_0.8.6  ReporteRsjars_0.0.2 Boruta_5.0.0  ranger_0.5.0  
# 
# loaded via a namespace (and not attached): 
# [1] Rcpp_0.12.6  png_0.1-7   digest_0.6.9  mime_0.5   R.methodsS3_1.7.1 R6_2.1.2   
# [7] xtable_1.8-2  gdtools_0.0.7  R.oo_1.20.0  R.utils_2.3.0  xml2_1.0.0  tools_3.3.1  
# [13] shiny_0.13.2  httpuv_1.3.3  htmltools_0.3.5 rJava_0.9-8  rvg_0.1.0   knitr_1.13 

# Save use ReporteRs 
doc <- NULL 
doc <- docx(title = 'Crash Boruta') 
doc <- addParagraph(doc, 'Example') 
doc <- addPlot(doc = doc, 
       fun = function() 
       plot(example.boruta, 
        las=2, 
        xlim = c(4,6)), 
       vector.graphic = TRUE) 
writeDoc(doc = doc, 'example crash boruta.docx') # Its worked 

doc <- NULL 
doc <- docx(title = 'Crash Boruta') 
doc <- addParagraph(doc, 'Example') 
doc <- addPlot(doc = doc, 
       fun = function() 
       plot(example.boruta, 
         las=2, 
         xlim = c(3,6)), 
       vector.graphic = TRUE) 

      ### 
      ### 
      ### 
      ## ## 
     ##  ## 
     ##   ## 
     ## he hanged## 
     ## himself ## 
     ##  ## 
     ##  ## 
     ## ## 
      #### 
+0

danke. Es ist ein Fehler in der Clipping-Funktion (Ich habe gerade ein GH-Problem hier erstellt: https://github.com/davidgohel/rvg/issues/7). Ich werde Sie wissen lassen, wann es gelöst wird. –

+0

Anton, ein Update ist jetzt verfügbar unter github.com/davidgohel/rvg –

+0

Vielen Dank. P.S. Ich kann es nicht von github installieren "Konnte keine Build-Tools finden, die notwendig sind, um rvg zu erstellen". gcc Version 4.9.3 (x86_64-posix-seh, Erstellt von MinGW-W64 Projekt). –