SyntaxFix
Write A Post
Hire A Developer
Questions
I made this for when doing aggregate functions and similar
per.fun <- function(x) { if(length(x)>1){ denom <- length(x); num <- sum(x); percentage <- num/denom; percentage*100 } else NA }