Re: [R] Problem with Plotting in R

2018-12-19 Thread MacQueen, Don via R-help
You haven't described what you are trying to get with the command that doesn't work. My guess is that this might be what you want: plot( x, MyData$NWorth, type="l" ) lines( x, MyData$NWorthSm) However, you might also have to calculate and supply a for the ylim argument to plot(

Re: [R] Problem with Plotting in R

2018-12-18 Thread Rui Barradas
Hello, You are calling plot.default with 4 arguments. The first 2 are x and y. The 3rd is type. So MyData$NWorthSm becomes the 4th, xlim. When you pass xlim a value, MyData$NWorthSm becomes the next one, ylim. Etc, etc, etc. It will throw the errors in the order of the arguments you can see in

Re: [R] Problem with Plotting in R

2018-12-18 Thread Michael Dewey
Dear Bob We do not have your data so it is hard to be sure but plot() takes two parameters for the data x and y so when you give it three you are confusing it into thinking one of them is something else. What exactly were you trying to do with the failed command? On 18/12/2018 14:17, rsherry

[R] Problem with Plotting in R

2018-12-18 Thread rsherry8
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" )