How can I get the total disk space / free disk space of my windows computer ?
If there is no R function, maybe there is a windows command that I could use within the R system
function but I wasn't able to find that command.
How can I get the total disk space / free disk space of my windows computer ?
If there is no R function, maybe there is a windows command that I could use within the R system
function but I wasn't able to find that command.
Though I find it really difficult to believe that a Google search for windows cmd disk space
came up empty for you, this should provide the information you need w/o the need for admin privileges:
disks <- system("wmic logicaldisk get size,freespace,caption", inter=TRUE)
disks <- read.fwf(textConnection(disks[1:(length(disks)-1)]),
widths=c(9, 13, 13), strip.white=TRUE, stringsAsFactors=FALSE)
colnames(disks) <- disks[1,]
disks <- disks[-1,]
rownames(disks) <- NULL
disks
## Caption FreeSpace Size
## 1 A:
## 2 C: 52617023488 63898120192
## 3 D:
Just thought I'd also add that this answer comes from someone who is primarily an OS X/Linux user.