rowsum <- function(data,na.rm=TRUE){
if (na.rm){
x <- rowSums(data,na.rm = TRUE)
x[rowSums(is.na(data)) == ncol(data)] <- NA
}else{
x <- rowSums(data,na.rm = FALSE)
}
x
}
rowmean <- function(data,na.rm=TRUE){
if (na.rm){
x <- rowMeans(data,na.rm = TRUE)
x[rowSums(is.na(data)) == ncol(data)] <- NA
}else{
x <- rowMeans(data,na.rm = FALSE)
}
x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.