Re: [R] S/R and data mining (was can't understand R)
Hi Thomas, @Book{hastie.et.al:01, author= {T. Hastie and R. Tibshirani and J. Friedman}, address = {New York}, publisher = {Springer-Verlag}, title = {The Elements of Statistical Learning: Data Mining, Inference and Prediction}, year = {2001} } might be helpful. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/396887 Fax: +32/16/337015 Web: http://www.med.kuleuven.ac.be/biostat/ http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm - Original Message - From: Thomas Schönhoff [EMAIL PROTECTED] To: R User-Liste [EMAIL PROTECTED] Sent: Tuesday, September 21, 2004 9:34 AM Subject: Re: [R] can't understand R Hello, Uwe Ligges schrieb: Erin L. Leisz wrote: If the manual An Introduction to R is not sufficient for you, what about reading a book, e.g. Peter Dalgaard's Introductory Statistics with R, Springer? Here you learn R along some basic statistical analyses. BTW, can anybody recommend a book on S/R and data mining? Thomas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S/R and data mining (was can't understand R)
Thanks Dimitri and Vito, I'll soon have a look at your recommendations (except the mentioned book which might take some time to get hands at! Thomas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S - R
Have you tried following the advice in the R Data Import/Export manual? It suggests the following: Function data.restore reads S-PLUS data dumps (created by data.dump) with the same restrictions (except that dumps from the Alpha platform can also be read). It should be possible to read data dumps from S-PLUS 5.x and 6.x written with data.dump(oldStyle=T). -- Tony Plate At Wednesday 10:29 AM 8/25/2004, Zachary Skrivanek wrote: Hello! I would like to be able to read in list data objects in R/S created in R/S. (Ie R-S or S-R.) I have tried 'dput' and 'dump' in S, but neither of the created files could be read into R (with 'dget' nor 'source'). Is there any way that I can save a list object in S that can be read into R? Sincerely, Zachary Skrivanek, PhD Research Scientist Program Phase Statistics-Endocrine [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S - R
Zachary Skrivanek wrote: Hello! I would like to be able to read in list data objects in R/S created in R/S. (Ie R-S or S-R.) I have tried 'dput' and 'dump' in S, but neither of the created files could be read into R (with 'dget' nor 'source'). Is there any way that I can save a list object in S that can be read into R? Have you read section 3.1 in R Data Import/Export? http://cran.r-project.org/doc/manuals/R-data.pdf --sundar __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] S - R
Hi, -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Zachary Skrivanek Sent: Wednesday, August 25, 2004 6:29 PM To: [EMAIL PROTECTED] Subject: [R] S - R 'source'). Is there any way that I can save a list object in S that can be read into R? With S you probably mean S-PLUS, right? Given that is the case, it depends on the version of S-PLUS you are using. I had no problems to dump a list and then load it into R as long as I was using S-PLUS 2000. When I switched to S-PLUS 6, I suddenly could not do that anymore. It was possible again to do it when I used the same specification of dump by setting the argument oldStyle=T This indicates that (excerpt from ?dump) oldStyle logical flag; should the file be written in a form that can be read by earlier versions of S-PLUS? If F, then the file will not be readable by versions of S-PLUS earlier than 5.0 (Unix) or 6.0 (Windows). Hope this gets you going. By the way, this has been discussed before on this list. Please check (could be googled by using the keywords: R-project S-PLUS dump; it is actually the first hit): http://tolstoy.newcastle.edu.au/R/help/04/01/0650.html (for the beginning of the thread) http://tolstoy.newcastle.edu.au/R/help/04/01/0665.html (for the same suggestion as given in my message here) Roland + This mail has been sent through the MPI for Demographic Rese...{{dropped}} __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S - R
I'm puzzled by the discourse in this thread. Briefly, dput() and dget() seem to work just fine for me. I tried junk - list(x=rnorm(20),y=sample(1:100,12,TRUE)) dput(junk,junk.dat) in Splus (Version 6.1.2 Release 2 for Sun SPARC, SunOS 5.6 : 2002) and then in R junk - dget(junk.dat) R version: platform sparc-sun-solaris2.9 arch sparc os solaris2.9 system sparc, solaris2.9 status major1 minor9.1 year 2004 month06 day 21 language R There were no complaints, and typing ``junk'' in the R window and in the Splus window appeared to produce indentical results. So what's the problem? cheers, Rolf Turner [EMAIL PROTECTED] Tony Plate wrote: Have you tried following the advice in the R Data Import/Export manual? It suggests the following: Function data.restore reads S-PLUS data dumps (created by data.dump) with the same restrictions (except that dumps from the Alpha platform can also be read). It should be possible to read data dumps from S-PLUS 5.x and 6.x written with data.dump(oldStyle=T). -- Tony Plate At Wednesday 10:29 AM 8/25/2004, Zachary Skrivanek wrote: Hello! I would like to be able to read in list data objects in R/S created in R/S. (Ie R-S or S-R.) I have tried 'dput' and 'dump' in S, but neither of the created files could be read into R (with 'dget' nor 'source'). Is there any way that I can save a list object in S that can be read into R? Sincerely, Zachary Skrivanek, PhD Research Scientist Program Phase Statistics-Endocrine __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S - R
I think the issue is that dput() and dget() don't work for some more complex structures (as you point out, they do appear to work for simple structures). The R Data Import/Export manual doesn't mention using dput and dget to transfer objects between R and S-PLUS, perhaps because these functions have limited coverage? E.g.: S-PLUS6.1 junk - list(f=as.name(g)) S-PLUS6.1 dput(junk,junk1.dat) S-PLUS6.1 data.dump(junk, file=junk2.dat, oldStyle=F) S-PLUS6.1 data.dump(junk, file=junk3.dat, oldStyle=T) R dget(junk1.dat) Error in eval(expr, envir, enclos) : Object g not found R # with package foreign loaded R data.restore(junk2.dat) Error in ReadSdump(TRUE, ) : S mode junk (near byte offset 45) not supported In addition: Warning message: NAs introduced by coercion R data.restore(junk3.dat) [1] junk3.dat R junk $f g -- Tony Plate At Wednesday 11:45 AM 8/25/2004, Rolf Turner wrote: I'm puzzled by the discourse in this thread. Briefly, dput() and dget() seem to work just fine for me. I tried junk - list(x=rnorm(20),y=sample(1:100,12,TRUE)) dput(junk,junk.dat) in Splus (Version 6.1.2 Release 2 for Sun SPARC, SunOS 5.6 : 2002) and then in R junk - dget(junk.dat) R version: platform sparc-sun-solaris2.9 arch sparc os solaris2.9 system sparc, solaris2.9 status major1 minor9.1 year 2004 month06 day 21 language R There were no complaints, and typing ``junk'' in the R window and in the Splus window appeared to produce indentical results. So what's the problem? cheers, Rolf Turner [EMAIL PROTECTED] Tony Plate wrote: Have you tried following the advice in the R Data Import/Export manual? It suggests the following: Function data.restore reads S-PLUS data dumps (created by data.dump) with the same restrictions (except that dumps from the Alpha platform can also be read). It should be possible to read data dumps from S-PLUS 5.x and 6.x written with data.dump(oldStyle=T). -- Tony Plate At Wednesday 10:29 AM 8/25/2004, Zachary Skrivanek wrote: Hello! I would like to be able to read in list data objects in R/S created in R/S. (Ie R-S or S-R.) I have tried 'dput' and 'dump' in S, but neither of the created files could be read into R (with 'dget' nor 'source'). Is there any way that I can save a list object in S that can be read into R? Sincerely, Zachary Skrivanek, PhD Research Scientist Program Phase Statistics-Endocrine __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S - R
Thanks Tony. But the Mr. Skrivanek initially said he couldn't get dput() and dget() to work with ***lists***. It seems to turn out that lists, as such, are not the issue. The problem stems from having relatively weird components in the lists. Also, in your example, the issue is not an R -- S incompatibility problem. The example causes an error even if one stays entirely within Splus (or within R): ===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+=== junk - list(f=as.name(g)) dput(junk,junk.dat) crap - dget(junk.dat) Problem in dget(junk.dat): Object g not found Use traceback() to see the call stack ===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+=== And the same happens in R (except that the error message is phrased differently: ===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+=== Error in structure(list(f = g), .Names = f) : Object g not found ===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+=== cheers, Rolf Turner [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] S/R/RWeb/ODBC
Yes, however the same odbcConnect syntax works in the R Commands window. But seemingly not from within a function in .Rprofile when using RWeb to run the function in batch mode. Should mention I have no problem running the function if I bring the data in from the PERL script that runs R. E.g. (whatever edited) Batch (passing function call via an RWeb PERL script) library(RODBC) channel-odbcConnect('xyz',uid='whatever',pw='whatever',dsn='whatever',case= 'nochange') cat(\n,channel) -1 Interactive library(RODBC) channel-odbcConnect('xyz',uid='whatever',pw='whatever',dsn='whatever',case= 'nochange') Warning message: NAs introduced by coercion channel RODB Connection 0 Details: case=nochange DSN=whatever UID=whatever PWD=whatever DBQ=whatever DBA=W APA=T FEN=T QTO=T FRC=10 FDL=10 LOB=T RST=T FRL=F MTS=F CSR=F PFC=10 TLO=0 Mark Fowler Marine Fish Division Bedford Inst of Oceanography Dept Fisheries Oceans Dartmouth NS Canada [EMAIL PROTECTED] -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: June 15, 2004 4:04 PM To: Fowler, Mark Cc: '[EMAIL PROTECTED]' Subject: Re: [R] S/R/RWeb/ODBC Sounds like a permissions/ownership problem. odbcConnect returnign -1 just means that the ODBC device manager failed. On Tue, 15 Jun 2004, Fowler, Mark wrote: I'm looking for an optimal approach to access Oracle databases via RWeb applications. I'm new to R but familiar with programming functions and web pages for the S+ Statserver. I'm now going through the motions of migrating S+/Statserver applications to R/RWeb as a feasability exercise. I can S+access databases using ODBC directly in R or S, and using Statserver, but I have not succeeded at extracting into R in RWebs batch mode. I can 'require RODBC' in .Rprofile with apparent success, but the results of odbcConnect differ from those when the command is typed into the R commands window. Instead of a parameter list I get a -1. Does anyone know the solution to this problem? Also, might anyone know the comparative merits of using some PERL module (like DBD::Oracle) to do the extraction, as opposed to using RODBC (assuming RODBC can be implemented in batch mode)? I'm currently using Apache on Windows XP if relevant, but LINUX may be the final host (we'll compare, but those more Web-wise than I expect LINUX to outperform Windows for our purposes). Mark Fowler Marine Fish Division Bedford Inst of Oceanography Dept Fisheries Oceans Dartmouth NS Canada [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S/R/RWeb/ODBC
Sounds like a permissions/ownership problem. odbcConnect returnign -1 just means that the ODBC device manager failed. On Tue, 15 Jun 2004, Fowler, Mark wrote: I'm looking for an optimal approach to access Oracle databases via RWeb applications. I'm new to R but familiar with programming functions and web pages for the S+ Statserver. I'm now going through the motions of migrating S+/Statserver applications to R/RWeb as a feasability exercise. I can access databases using ODBC directly in R or S, and using Statserver, but I have not succeeded at extracting into R in RWebs batch mode. I can 'require RODBC' in .Rprofile with apparent success, but the results of odbcConnect differ from those when the command is typed into the R commands window. Instead of a parameter list I get a -1. Does anyone know the solution to this problem? Also, might anyone know the comparative merits of using some PERL module (like DBD::Oracle) to do the extraction, as opposed to using RODBC (assuming RODBC can be implemented in batch mode)? I'm currently using Apache on Windows XP if relevant, but LINUX may be the final host (we'll compare, but those more Web-wise than I expect LINUX to outperform Windows for our purposes). Mark Fowler Marine Fish Division Bedford Inst of Oceanography Dept Fisheries Oceans Dartmouth NS Canada [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S/R programming books
You might be interested in William N. Venables and Brian D. Ripley. S Programming. Springer, 2000. ISBN 0-387-98966-8. There are also many books listed at http://www.r-project.org under Publications. -roger Samuel Kemp (Comp) wrote: Hi, I have been using R for a few months now and I am confident that the language has everything I will need to complete my PhD. I can create functions, script files and packages, but I would like to write my programs more efficiently (maybe using OO). Can anyone recommend a good book on the art of good R programming? Kind Regards, Sam. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S/R programming books
Samuel: If you have just started with R, then you may also wish to look at Venables and Ripley, Modern Applied Statistics with S, though you may also wish to examine the free material at www.r-project.org, as suggested. Also, if you tell us more about your special interests, someone might be able to make more focused suggestions. hope this helps. spencer graves Roger D. Peng wrote: You might be interested in William N. Venables and Brian D. Ripley. S Programming. Springer, 2000. ISBN 0-387-98966-8. There are also many books listed at http://www.r-project.org under Publications. -roger Samuel Kemp (Comp) wrote: Hi, I have been using R for a few months now and I am confident that the language has everything I will need to complete my PhD. I can create functions, script files and packages, but I would like to write my programs more efficiently (maybe using OO). Can anyone recommend a good book on the art of good R programming? Kind Regards, Sam. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S/R programming books
Hallo Samuel! You can find a talk by Friedrich Leisch about S4 at the UseR2004 conference side S4 Classes and Methods Its a good overview of S3 and S4. goolge Use R2004 and look for keynotes. If you decide to use S4 to implement your packages. (what is recomended) you would have no many choises in buying a books. Most of the S/R books are about using R and not about R programming. There is only one book/document that describes S4 Programming with Data by John Chambers (the so called Green Book). The functionality which the methods package provides follows the language specification described in this book. So it is a must have so to say. If you do not like S4 you can take a look at Henrik Bengtsson R.oo packages (Google R.oo). People which like Jave like it much more than S4. Sincerely Eryk *** REPLY SEPARATOR *** On 6/1/2004 at 2:13 PM Samuel Kemp (Comp) wrote: Hi, I have been using R for a few months now and I am confident that the language has everything I will need to complete my PhD. I can create functions, script files and packages, but I would like to write my programs more efficiently (maybe using OO). Can anyone recommend a good book on the art of good R programming? Kind Regards, Sam. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic Ihnestrasse 63-73 14195 Berlin 'v' tel: 0049-30-83875219 / \ mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] S/R programming books
On Tue, 01 Jun 2004 14:13:23 +0100 Samuel Kemp (Comp) [EMAIL PROTECTED] wrote: Hi, I have been using R for a few months now and I am confident that the language has everything I will need to complete my PhD. I can create functions, script files and packages, but I would like to write my programs more efficiently (maybe using OO). Can anyone recommend a good book on the art of good R programming? If you have patience (book announced for July 2004) and read German, Programmieren mit R by Uwe Ligges (Springer Verlag, ISBN: 3-540-20727-9) might be an other answer to your needs. See: http://www.springeronline.com/sgw/cda/frontpage/0,10735,5-40109-22-26682866-0,00.html HTH, Tobias __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html