| goose_review_code | R Documentation |
Get AI-powered code review and suggestions for improvement.
goose_review_code(
code,
focus = c("performance", "style", "bugs", "documentation"),
context = NULL,
detailed = TRUE
)
code |
Character string or function containing R code to review |
focus |
Character vector of focus areas (e.g., "performance", "style", "bugs") |
context |
Optional context about the code's purpose |
detailed |
Logical, whether to request detailed analysis |
List with review results including suggestions, issues, and improvements
## Not run:
# Review a function
my_func <- function(x) {
for(i in 1:length(x)) {
x[i] <- x[i] * 2
}
return(x)
}
review <- goose_review_code(my_func, focus = c("performance", "style"))
# Review code string
code <- "df$new_col = df$col1 + df$col2"
review <- goose_review_code(code, context = "Adding columns in data frame")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.