#' remove repeated rows from data frame so stipulated variable value is unique.
#' this is useful to produce concise data frame after using \code{ave()} to get means/sds.
#'
#' \code{UNI(frame,varcol)}
#'
#'
#' @param \code{frame} name of the data frame.
#' @param \code{varcol} is the column number of the variable which is to be unique
UNI=function(frame,varcol){
NEW=frame[order(frame[,varcol]),]
NEWER=NEW[1,]
for(a in 2:nrow(NEW)){
if(NEW[a,varcol]!=NEW[a-1,varcol]) NEWER=rbind(NEWER,NEW[a,])
}
return(invisible(NEWER))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.