csgillespie / benchmarkme

Crowd sourced benchmarking
https://csgillespie.github.io/benchmarkme/
41 stars 13 forks source link

get_ram() fails on mac os x 10.9.5 #2

Closed vzemlys closed 8 years ago

vzemlys commented 8 years ago

The issue is the following line:

 ram = system("system_profiler -detailLevel mini | grep \"  Memory:\"", 
+        intern = TRUE)[1]

which in my case is:

[1] "      Memory: 8 GB"

This is strsplit on the space and passed to to_Bytes which expects the first element to be 8 and the second "GB". Which is evidently not the case.

Here is my sessionInfo() :

R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8

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

other attached packages:
[1] benchmarkme_0.1.3 devtools_1.9.1   

loaded via a namespace (and not attached):
 [1] lattice_0.20-33  digest_0.6.8     grid_3.2.1       R6_2.1.1        
 [5] jsonlite_0.9.19  magrittr_1.5     httr_1.0.0       stringi_1.0-1   
 [9] curl_0.9.4       rstudioapi_0.3.1 DT_0.1           Matrix_1.2-2    
[13] tools_3.2.1      stringr_1.0.0    htmlwidgets_0.5  yaml_2.1.13     
[17] compiler_3.2.1   memoise_0.2.1    htmltools_0.2.6