Functions in R - General properties -
i'm new r, come vba background.
if understand correctly, cannot make procedures ( subs ) in r can in vba or vb? how make functino runs procedure? i'm trying on code below, there way can run is, or have have parameters within function?
pgraf <- function () { library(ggplot2) dframe <- data.frame( x = c(3,1,5), y= c(2,4,6), label = c("a", "b", "c")) p <- ggplot (dframe, aes(x, y, label = label)) + xlab(null) + ylab(null) p <- p + geom_point() + opts(title="geom_point") return (pgraf) }
Comments
Post a Comment