R/Reciprocal.R

Defines functions Reciprocal

Reciprocal <-
function(x){
	
	n = length(x)
	temp = c()
	for(i in 1: n){
		if(x[i] == 0) temp[i] = 0
		else temp[i] = 1/x[i]
	}
	return(temp)
}

Try the fcd package in your browser

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

fcd documentation built on May 2, 2019, 3:28 p.m.