Skip to content
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

Memory units in mem_used() after mathemematical operation #40

Open
Alectoria opened this issue Aug 24, 2015 · 0 comments
Open

Memory units in mem_used() after mathemematical operation #40

Alectoria opened this issue Aug 24, 2015 · 0 comments

Comments

@Alectoria
Copy link

I want to convert units in mem_used() but I am confused by (1) how units are switched automatically and by (2) how units are changed but not the value. For example:

mem_used()
28.7 MB

# Operation 1 (I want to convert to GB)
mem_used()/1024
28.1 kB

# Operation 2 (I want to convert to kB)
mem_used()*1024
29.4 GB

But the operations above should have rather yielded for Operation # 1: '0.02803 GB' and for Operation # 2: '29388.8 kB'.

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] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] pryr_0.1.2

loaded via a namespace (and not attached):
[1] magrittr_1.5     tools_3.2.1      Rcpp_0.12.0      stringi_0.5-5    codetools_0.2-11 stringr_1.0.0   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant