how to define a function in rstudio. There are any references about how to define a function in rstudio in here. you can look below.