say_my_name <- function(name_in) { # Print a single name in the prompt # # ARGS: name_in - Name to be printed # # RETURNS: TRUE, if sucessfull my_msg <- paste0('Your name is ', name_in) message(my_msg) # invisible will omit output if function is called without definition of output return(invisible(TRUE)) } # testing say_my_name('Marcelo')
# none my_answers <- rep(0, 5)
Crie uma função chamada say_my_name
que tome como entrada um nome de pessoa e mostre na tela o texto Your name is .... Dentro do escopo da função, utilize comentários para descrever o propósito da função, suas entradas e saídas.
extype: string
exsolution: r mchoice2string(c(TRUE, FALSE, FALSE, FALSE, FALSE), single = TRUE)
exname: "function 01"
exshuffle: TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.