[R] plot.new?

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Aug 26 17:44:50 CEST 2004


Filippo Biscarini wrote:

> Hi all,
> 
> I am just beginning to use R and encountered a problem in trying to draw a
> regression line using the command "abline(coef(var)" and similar ones but
> got the error "plot.new  has not been called yet". Does anybody know how can
> I call plot.new? Is this an additional package to be found somewhere on the
> web? Is it a functionality that I just have to "activate" somehow?

?abline: "This function adds one or more straight lines through the 
current plot.", i.e. the already existing *current plot*.

So plot your data (e.g. with plot(x, y)) before adding a regression line.

Uwe Ligges



> I am using R both on windows and on Linux and get the same error message
> when using those drawing functions.
> 
> Thank you,
> 
> Filippo Biscarini
>   ****************************
>   Filippo Biscarini,
>   Research and Development
>   ANAFI (Italian Holstein Association)
>   Via Bergamo, 292
>   26100, Cremona, Italy
> 
>   tel: +39.0372.474234
> 
>   *****************************
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list