davidgohel / ReporteRs

Note that ReporteRs has been removed from CRAN the 16th of July 2018 and is not maintained anymore. please migrate to officer.
244 stars 44 forks source link

Error in length.pptx(obj) : attempt to apply non-function #178

Closed juliezhu324 closed 7 years ago

juliezhu324 commented 7 years ago

Hi Team,

I'm getting Error in length.pptx(obj) : attempt to apply non-function whenever I simply run doc = pptx( title = "title" ).

I recently updated to R3.3.2 and this never occurred with R3.2.2.

Sessioninfo:

## R version 3.3.2 (2016-10-31)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 7 x64 (build 7601) Service Pack 1
## 
## locale:
## [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
## [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
## [5] LC_TIME=English_United States.1252    
## 
## attached base packages:
## [1] tcltk     stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] officer_0.0.7         gdtools_0.1.3         rjson_0.2.15          httr_1.2.1           
##  [5] RJDBC_0.2-5           DBI_0.5-1             ggplot2_2.1.0         splitstackshape_1.4.2
##  [9] data.table_1.9.6      tidyr_0.6.0           plyr_1.8.4            sqldf_0.4-10         
## [13] RSQLite_1.1-2         gsubfn_0.6-6          proto_1.0.0           ReporteRs_0.8.8      
## [17] RODBC_1.3-14          dpar_1.0.1.13         ReporteRsjars_0.0.2   rJava_0.9-8          
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_0.12.9        RColorBrewer_1.1-2 git2r_0.15.0       R.methodsS3_1.7.1  R.utils_2.5.0     
##  [6] base64enc_0.1-3    tools_3.3.2        digest_0.6.12      jsonlite_1.2       memoise_1.0.0     
## [11] tibble_1.2         gtable_0.2.0       png_0.1-7          shiny_0.14.2       curl_1.2          
## [16] withr_1.0.2        dplyr_0.5.0        xml2_1.1.1         knitr_1.14         devtools_1.12.0   
## [21] grid_3.3.2         R6_2.2.0           rvg_0.1.3          purrr_0.2.2        magrittr_1.5      
## [26] scales_0.4.0       htmltools_0.3.5    assertthat_0.1     mime_0.5           colorspace_1.2-6  
## [31] xtable_1.8-2       httpuv_1.3.3       labeling_0.3       lazyeval_0.2.0     munsell_0.4.3     
## [36] chron_2.3-47       R.oo_1.20.0

Thanks for the amazingly powerful package!

davidgohel commented 7 years ago

Hi,

Thanks,

I can see officer is loaded. There is a conflict between length.pptx located in ReporteRs and in officer. If you detach officer, the error should not occur anymore.

David

juliezhu324 commented 7 years ago

Awesome! Thanks David!

davidgohel commented 7 years ago

I have just submitted a new officer version on cran. From now, you can have both packages loaded in your R session.