how to give table data as input to the function in R project........for doing some statistical analysis. -- View this message in context: http://n4.nabble.com/table-data-as-input-to-the-function-tp1565827p1565827.html Sent from the R help mailing list archive at Nabble.com.
Hi, You need to put your table into a data frame by using read.table. You can then do statistical analyses on the data frame. Natalie -- View this message in context: http://n4.nabble.com/table-data-as-input-to-the-function-tp1565827p1565842.html Sent from the R help mailing list archive at Nabble.com.
Hi chinna, Welcome to the forum and thanks for asking questions. You may not realise this but the questions you ask and the answers people provide here may help a lot of people later on. I have learnt a lot about R simply by searching the older posts on this forum. So, it is important that you ask good questions in a clear manner. The more time you spend on carefully writing your question, the faster answers you will get here. For example, for your present question I suggest you: 1. provide a sample of the data you are working with. 2. say what you are trying to achieve with the data. 3. what function you are talking about 4. what statistical analysis you wish to perform (all of R is for statistical analysis!) I hope this helps and I look forward to helping you out. ----- Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context: http://n4.nabble.com/table-data-as-input-to-the-function-tp1565827p1565857.html Sent from the R help mailing list archive at Nabble.com.
sorry for asking again and again my Requirement: i am connecting to teradata database and i am accessing tables and table data also, i need generate graphs using that data and also i need to forecast the results. for example i have a table xyz Store Year Revenue abc 2010 $557889 def 2010 $697356 i want to draw a barplot and i want to forecast the results of revenue for next year can u please tell me wheather this is possible or not? if possible give me the suggestions. (graphs in the sense using some business intelligence tools like cognos,business objects using that tools we are generating graphs for analysing sales information of retail stores and graphs generation.) -- View this message in context: http://n4.nabble.com/table-data-as-input-to-the-function-tp1565827p1566977.html Sent from the R help mailing list archive at Nabble.com.
On 02/24/2010 04:30 PM, chinna wrote:> > sorry for asking again and again > > my Requirement: > > i am connecting to teradata database and i am accessing tables and table > data also, i need generate graphs using that data and also i need to > forecast the results. > > for example > > i have a table xyz > > Store Year Revenue > > abc 2010 $557889 > def 2010 $697356 > > i want to draw a barplot and i want to forecast the results of revenue for > next year > > > can u please tell me wheather this is possible or not? > if possible give me the suggestions. > > > (graphs in the sense using some business intelligence tools like > cognos,business objects using that tools we are generating graphs for > analysing sales information of retail stores and graphs generation.) >Hi chinna, Drawing a barplot is relatively easy, as there are quite a few functions apart from plain old "barplot" that will give you a lot of options. Here is a candy-colored example using barNest in the plotrix package: xyz<-data.frame(Store=rep(c("abc","def","ghi"),3), Year=rep(2007:2009,each=3),Revenue=rnorm(9,500000,100000)) barNest(Revenue~Year+Store,xyz,showall=TRUE, main="Revenue by store and year", ylab="Revenue",col=list("gray",2:4,5:7)) The forecasting part could be as simple as: abc.lm<-lm(Revenue~Year,xyz[xyz$Store == "abc",]) def.lm... and then use the coefficient for Year to provide a linear estimate of the succeeding year(s). For the toy data I generated, I estimated that store abc would make a loss of $94554 in 2010. If you want more than a simple linear predictor, just use a different model. Jim