sankar82
2009-Jan-15 14:07 UTC
[R] using R how to read a one column alone from a database table from MySQL
hello friends i have a created a database table in MYSQL consisting of 11 columns. throught RMYSQL i managed to read the entire table in R. but i have few qureries which i need solutions...here they are: 1. Using R how to read a one column alone from a database table from MYSQL. 2. Using R how to print on screen those column value. 3. Using R how to print one particular row (in this case row is X)value alone. 4. Using R how to read all the column (11) and print (X) value alone on screen. 5. Using R with logic print those (X) value which is/between say 20 to 30 degrees. as im very new to this R software....its quite awkward for an experienced user to give me the solutions for my above queries...but i would be thankful if i get the solutions and it will also be an learning for me too...so i kindly request any people in this forum to give me solutions how to do it... BR sankar. -- View this message in context: http://www.nabble.com/using-R-how-to-read-a-one-column-alone-from-a-database-table-from-MySQL-tp21478288p21478288.html Sent from the R help mailing list archive at Nabble.com.
Dieter Menne
2009-Jan-15 16:55 UTC
[R] using R how to read a one column alone from a database table from MySQL
sankar82 <sankar.arughadhoss <at> tkk.fi> writes:> i have a created a database table in MYSQL consisting of 11 columns. > throught RMYSQL i managed to read the entire table in R. but i have few > qureries which i need solutions...here they are: > > 1. Using R how to read a one column alone from a database table from MYSQL. > 2. Using R how to print on screen those column value. > 3. Using R how to print one particular row (in this case row is X)value > alone. > 4. Using R how to read all the column (11) and print (X) value alone on > screen. > 5. Using R with logic print those (X) value which is/between say 20 to 30 > degrees. >Have you tried the examples in Rmysql-package? For 5., you could use something like: dbSendQuery(con, "select * from WL where width\_nm between 0.5 and 1") Ok, here we let SQL do the job, and you homework want it to be done in R. Dieter
sankar82
2009-Jan-19 13:38 UTC
[R] using R how to read a one column alone from a database table from MySQL
hello dieter, sorry for the late reply... yes my homework needs to be done in R and thats y i have these questions posted in this forum...hope u reply me the solutions and also thank you for spending ur precious time in my problem... BR sankar. Dieter Menne wrote:> > sankar82 <sankar.arughadhoss <at> tkk.fi> writes: > >> i have a created a database table in MYSQL consisting of 11 columns. >> throught RMYSQL i managed to read the entire table in R. but i have few >> qureries which i need solutions...here they are: >> >> 1. Using R how to read a one column alone from a database table from >> MYSQL. >> 2. Using R how to print on screen those column value. >> 3. Using R how to print one particular row (in this case row is X)value >> alone. >> 4. Using R how to read all the column (11) and print (X) value alone on >> screen. >> 5. Using R with logic print those (X) value which is/between say 20 to 30 >> degrees. >> > > Have you tried the examples in Rmysql-package? > For 5., you could use something like: > > dbSendQuery(con, "select * from WL where width\_nm between 0.5 and 1") > > Ok, here we let SQL do the job, and you homework want it to be done in R. > > Dieter > > ______________________________________________ > R-help at 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. > >-- View this message in context: http://www.nabble.com/using-R-how-to-read-a-one-column-alone-from-a-database-table-from-MySQL-tp21478288p21543180.html Sent from the R help mailing list archive at Nabble.com.