thank you , it works .

another problem is if can could define a variable to express the data.frame?
for example :
datanam<-c("newdata","newdata2")
plot(datanam[1][[newnam[1]]])


2011/8/30 Justin Haynes <jtor14@gmail.com>

> try:
>
> newnam<-paste('newdatadat',dayno,sep='')
>
> plot(test[[newnam[1]]])
>
>
> On Mon, Aug 29, 2011 at 12:29 PM, Jie TANG <totangjie@gmail.com> wrote:
>
>> hi, R-users
>>   I have a data.frame for example  test$newdataday24 and test$newdataday48
>> I can plot them by
>> plot(test$newdataday24)
>> but now i want to plot different data by define a variable to describe
>> them
>> dayno<-c(24,48)
>> newnam<-paste("test$newdataday",dayno,sep="")
>> plot(newnam[1])
>>
>> but i failed,the error message said that something wrong with plot.window
>>
>> what can i do to fix my script ? thanks
>> -
>> TANG Jie
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>


-- 
TANG Jie
Email: totangjie@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

	[[alternative HTML version deleted]]

