Nothing
#' Fetch Selected Text
#'
#' @return The selected text and if it contains alphabets
#'
#' @examples
#' \dontrun{
#' fetchSelectedText()
#' }
#'
#' @export
#'
#'
fetchSelectedText <- function() {
#fetch the selected text and see if it is valid for the define function
a <- rstudioapi::getSourceEditorContext()
s <- a$selection
selText <- s[[1L]]$text
alphaLetters <- stringr::str_extract(selText,"[A-z]")
secArg = FALSE
if(length(alphaLetters)){
if(!is.na(alphaLetters)) secArg = TRUE
}
return(c(secArg,selText))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.