[R] Problem with Plotting in R
rsherry8
r@herry8 @ending from comc@@t@net
Tue Dec 18 15:17:00 CET 2018
Please consider the following R statements:
> x = seq(1:1632)
> length( MyData$NWorth )
[1] 1632
> length( MyData$NWorthSm )
[1] 1632
> plot( x, MyData$NWorth, type="l" )
> plot( x, MyData$NWorthSm, type="l" )
> plot( x, MyData$NWorth, MyData$NWorthSm, type="l" )
All of the above statements work except for the last one. The last one
produces the following message:
Error in plot.window(...) : invalid 'xlim' value
So I then tired this:
> xlim1 = c(0, 5000)
>plot( x, MyData$NWorth, MyData$NWorthSm, type="l", xlim = xlim1 )
Which produced the following error message:
Error in plot.window(...) : invalid 'ylim' value
So, I tired this:
> ylim1 = c(0,9000)
> plot( x, MyData$NWorth, MyData$NWorthSm, type="l", xlim = xlim1,
ylim = ylim1 )
Which produced the following error message:
Error in strsplit(log, NULL) : non-character argument
I would like to know what I am doing wrong.
Thank you,
Bob
More information about the R-help
mailing list