Ralf, inside a function you'll need to print the plot using qplot. Change
it to
P <- qplot(1:10, letters[1:10])
print(P)
This is good practice even at the console, as you can then modify your plots
in increments
P2 <- P + more commands (text, more points, altered annotations etc)
print(P2)
etc
I have a script running in the StatET Eclipse environment that
executes the ggplot2 command qplot in a function:
# Creates the plot
createPlot <- function(){
print("Lets plot!")
qplot(1:10, letters[1:10])
}
When executing the qplot line directly, it works. When executing the
scrip
2 matches
Mail list logo