Description Usage Arguments Examples
Used by GriegSmith function
1 | sumofsquares(sizematrix, singlecounts)
|
sizematrix |
|
singlecounts |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## The function is currently defined as
function(sizematrix,singlecounts){
# print(sizematrix);
xsublength<-sizematrix[1];
ysublength<-sizematrix[2];
xsize<-length(singlecounts[1,]);
ysize<-length(singlecounts[,1]);
xmin<-rep(seq(from=1,to=xsize,by=xsublength),ysize/ysublength);
ymin<-sort(rep(seq(from=1,to=ysize,by=ysublength),xsize/xsublength));
submatricies<-cbind(xmin,ymin);
squaredsums<-sum(apply(submatricies,1,addem,data=singlecounts,xmatlen=xsublength,ymatlen=ysublength));
# print(squaredsums);
## sum up all the numbers in each matrix, square those numbers and add them;
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.