R/percenta.R

percenta <-
function(x,first,last)
{
{
	percentages<-x
	sum<-as.vector(apply(x[,first:last],1,sum))
	for(i in 1:nrow(x))
		{
		percentages[i,]<-x[i,]*100/sum[i]
		} 
}
return(percentages)
}

Try the paleoMAS package in your browser

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

paleoMAS documentation built on May 2, 2019, 6:46 a.m.