[R] Error producing density curve

Nicky Chorley nick.chorley at gmail.com
Wed Aug 27 07:48:28 CEST 2008


2008/8/27 rr400 <raul.felipe.ramirez at gmail.com>:
>
> Hi, i have never really used R before and i need to produce a density curve
> for use in an assignment. Following the instructions in the manual provided
> with my course i keep getting this error message:
> "Error in plot.xy(xy, type, ...) : invalid plot type '1'"
>
> The commands i have entered are:
>>x=seq(0, 1800, 10)
>>x
>>f=dnorm(x, 1454.190, 162.6301)
>>f
>>plot(x,f,type='1')

It's probably a lowercase L, not a 1 (to plot lines rather than points).

Regards,

Nicky Chorley



More information about the R-help mailing list