Some usefull R functions...