# Google Developers R Programming Video Lectures

**One Tip Per Day**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I got this Google Developers R Programming Video Lectures from Stephen’s blog – Getting Genetics Done.

stop() and warning() function

I was asked this question during a job interview. stop(‘message’) will print out the error message and stop the function. warning(‘message’) will print out the error message but continue the function.

To return index of an array/dataframe, use which(df, arr.ind=T), e.g. which(is.na(df), arr.ind=T) will return the column/row index of NA elements.

return() vs. invisible()

return() will return the values and print out in the screen.

invisible will return the values but not print out to the screen.

use recall() to call recursive function in R. For example, instead of writing recursive function like

myFunc <- function(a)

{

return(if(a>1, myFunc(log(a)), a));

}

, write it as

myFunc <- function(a)

{

return(if(a>1, recall(log(a)), a));

}

**leave a comment**for the author, please follow the link and comment on their blog:

**One Tip Per Day**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.