Displaying 2 results from an estimated 2 matches for "tempp".
Did you mean:
temp
2011 Dec 06
1
Memory getting eaten up with XML
...relevant data, then remove the document etc, it doesn't free up the memory. When I monitor it in windows task manager the memory usage just climbs with each iteration until R crashes. I can replicate the problem with the small example:
file.name<-"C:\\MyData.xml.gz"
TEMPP<-xmlParse(file.name)
xx <- xmlRoot(TEMPP)
rm(xx)
rm(TEMPP)
gc()
Even though I remove the root node xx and the document TEMPP, the memory usage remains the same as it was when I first read it in... Any ideas/solutions?
I am using a 32bit version of R 2.14.0 on...
2000 Sep 20
1
SV: sample from contingency table
...blem and I wrote this function
rmulti <- function(n, size, p)
{
NrDim <- length(p)
if(NrDim<2) stop("The simulated variabel has to be at least
2-dimensional")
res <- matrix(data=NA, nrow=n, ncol=NrDim)
p <- p/sum(p)
TempSize <- size
for(i in 1:NrDim)
{
TempP <- p[i]/sum(p[i:NrDim])
TempBin <- rbinom(n=n, size=TempSize, prob=TempP)
TempSize <- TempSize-TempBin
res[,i] <- TempBin
}
return(res)
}
# Then you can draw 10 samples like this, whith
# each row representing a contingency table
x <- as.matrix(1:4, nrow=2, ncol=2)...