if (FALSE) {
# 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")
}
Run the code above in your browser using DataLab