[R] new to R Project

spencerg spencer.graves at prodsyse.com
Tue Feb 23 05:19:31 CET 2010


Hi, Ivan:


	  Are you trying to read standard text or csv files?  If yes, then try 
"?read.table" at a command prompt.


	  Or are you trying to connect directly from R to a database system? 
If yes, which database system?  This can be done from R, but as far as I 
know, finding the functions and documentation on how to do this is not 
trivial.


	  To look at this, I tried the following:


library(sos)
db <- ???database


	  This requires the "sos" package, which you can get from CRAN using 
"install.packages('sos')", for example.


	  This command "???database" identified 892 help pages that matched the 
search term "database".  It returned a data.frame (like a matrix 
allowing different classes of objects in different columns) of class 
"findFn" (see ?findFn) of the 400 of these 892 with the strongest 
matches to the search term.


summary(db)


	  This gave me a summary by package of these first 400 help pages. 
I've found it useful to get all the matches, not merely the first 400, 
and look at the summary of those:

db9 <- ???database(999)
summary(db9)

        Package Count MaxScore TotalScore       Date
1       seqinr    41       34        292 2009-11-26
2          emu    32       38        412 2009-11-26
3       RMySQL    23       57        217 2009-04-16
4  RPostgreSQL    23       54        178 2009-11-05
5      ROracle    22       54        158 2008-06-14
6      RSQLite    22       35        206 2010-02-13
7         maps    19       24        142 2010-02-13
8          DBI    18       42        177 2010-01-09
9       TRAMPR    17       26        114 2007-06-30
10          GO    17        4         68 2005-07-23
11       RODBC    14       31        160 2009-10-19
12       GRASS    13       25         39 2010-01-29


	  This tells you that there are packages RMySQL, RPostgreSQL, ROracle, 
RSQLite, and RODBC, plus other packages whose names sound to me like 
they might be less useful for this.


	  However, if you use a particular database, you might be wise looking 
for that particular database, e.g., by "???Oracle".  This just gave me 
many more options not on the above list.


	  Hope this helps.
	  Spencer Graves

####################
Hi!
You should first go to the home page of the R project and read the 
manuals available there (and there are a lot).
When you'll understand how R works, read the posting guide and ask 
specific questions.
I don't think you'll get answers if you have such imprecise questions.
Ivan

Le 2/22/2010 14:07, Dr. David Kirkby a écrit :
> chinna wrote:
>> hi everyone,
>> i am new to R project can anyone please help me by providing
>> documents....
>>
>> my goal is using R i have to connect to the database and i have to
>> generate
>> reports.
>>
>> Thanks in advance
>> chinna.
>
> R is a complex program. If you can't work out how to find the
> documentation, I doubt you will be able to use R.
>
> Dave
>
> ______________________________________________
> 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.
>

______________________________________________
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.



More information about the R-help mailing list