Closed xiaodaigh closed 4 years ago
Could you run
system("wmic MemoryChip get Capacity", intern=TRUE)
and tell me what that returns?
"Capacity \r" "17179869184 \r" "17179869184 \r" "17179869184 \r" "17179869184 \r" "\r"
Thanks. Do you 16Gb of RAM or 4 * 16GB?
4 * 16G
I also get NA B
and system("wmic MemoryChip get Capacity", intern=TRUE)
returns [1] "Capacity \r" "4294967296 \r" "4294967296 \r" "\r"
. My machine has 8GB, so 2x4GB chips.
this works for me
system('grep MemTotal /proc/meminfo', intern = TRUE)
l = strsplit(a, " ")[[1]]
l = as.numeric(l[length(l)-1])
ram_size = l/1024^2
In fact, I have used this in the disk.frame package.
@xiaodaigh Does that work under windows 7 and 10?
Windows 10 but haven't tested on Windows 7.
Thanks everyone. I've added the method proposed by @xiaodaigh and used the previous method as a fallback.
I am also having the same problem where Get_ram() produces “NA B”
I used your code:
system("wmic MemoryChip get Capacity", intern=TRUE)
With an output of:
"Capacity \r" "17179869184 \r" "17179869184 \r" “\r”
This checks out since I have two 16 gb chips.
I run into the same problem under windows 10 with package version 1.0.7
Same here under Windows 10, package version 1.0.7, and R version 4.1.0 system("wmic MemoryChip get Capacity", intern=TRUE) [1] "Capacity \r" "17179869184 \r" "17179869184 \r" "\r" get_ram() NA B
When I run
get_ram
it returnsNA B
.Here is my
sessionInfo()