Functions created learning R