R/sumofsquares.R

Defines functions sumofsquares

Documented in sumofsquares

sumofsquares <-
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;
	


}

Try the GriegSmith package in your browser

Any scripts or data that you put into this service are public.

GriegSmith documentation built on May 2, 2019, 12:07 p.m.