Hello,
> Now I have changed the file to a new file as RData.csv file and now when I > use the below code it gives me an error > graph<- read.csv("RData.csv", header = TRUE) Here you read RData.csv into R as a data frame named graph. > MonthlyWeight<-by(RData$Weight,names.arg = RData$Month,sum) So here you need to refer to that data frame using the name you gave it. Your problem looks like a lack of basic understanding of how R works. Here are a couple of sources that might help you get started: http://www.burns-stat.com/documents/tutorials/impatient-r/ http://cyclismo.org/tutorial/R/ Sarah -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.