View source: R/modify_roxygen2.R
add_deprecated_call | R Documentation |
.Deprecated()
to Text.Deprecated()
is added after each function declaration in the text. Note that it does not check for an existing .Deprecated()
.
add_deprecated_call(text, new = NULL)
text |
Character vector containing function declarations. |
new |
(Optional) Argument passed to the new call to |
str_replace
Other modify roxygen2 documentation functions:
add_deprecated_to_desc()
library(tidyverse) # Adds after each function declaration add_deprecated_call("sample_function1 <-\nfunction(a,b,c){}\n\n#' Roxygen2 Documentation\n#' Roxygen2 Lines\n\nsample_function2 <- \nfunction(x,y,z){}") # Does not skip function declarations that already makes a call to the .Deprecated function add_deprecated_call("sample_function1 <-\nfunction(a,b,c){\n.Deprecated()\n}\n\n#' Roxygen2 Documentation\n#' Roxygen2 Lines\n\nsample_function2 <- \nfunction(x,y,z){}") # Text can be a vector of length greater than 1 add_deprecated_call(c("sample_function1 <-\nfunction(a,b,c){\n.Deprecated()\n}", "#' Roxygen2 Documentation\n#' Roxygen2 Lines\n\nsample_function2 <- \nfunction(x,y,z){}"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.