Displaying 1 result from an estimated 1 matches for "y1978".
Did you mean:
1978
2010 Nov 30
2
reference text variables as column name to plot
...ce I have a large number of these plots to make, and they are a bit
complex, I want to want to reference the column I want to plot via a
variable containing the name of that column. As follows:
similar='1978'
s=paste('Y',similar,sep='')
variable s now contains 'Y1978' which is the name of one of the columns.
However, when I try to plot
plot(z,s,type='l')
I get a 'x and y lengths differ' error because variable s is being
recognized as 'Y1978' length=1, rather than the contents of the column
Y1978 length=12.
I tried all...