1 / 14

An Introduction to R: The Dominant Open Source Statistical Language

R is a powerful open-source programming language widely used in the statistical research community. Developed from Bell Labs' S language, R facilitates rapid development of methods for various data types and supports extensive graphics capabilities. With nearly 2,400 contributed packages applicable across numerous scientific and business fields, R provides users with unparalleled flexibility and control. The active user community, international conferences, and comprehensive documentation ensure robust support and continuous development. Explore the possibilities with R and enhance your data analysis skills today.

randi
Télécharger la présentation

An Introduction to R: The Dominant Open Source Statistical Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. R freeware statistics package Tara Jenson NCAR RAL JNT Tom Hopson

  2. WhatisR? •Astatisticalprogramminglanguage •Inpart,developedfromtheSProgramming LanguagefromBellLabs(JohnChambers) •Createdtoallowrapiddevelopmentof methodsforuseindifferenttypesofdata. •Createnewgraphics.Manydefault parametersarechosen,butusersretain completecontrol.

  3. WhyR? •Rhasbecomethedominantlanguageinthestatistical researchcommunity. •RisOpenSourceandfree. •Runsonalloperatingsystems •Nearly2,400packagescontributed. •Packagesandapplications innearlyeveryfieldof science,businessandeconomics. •SeeRNotes,RJournalandJournalofStatistical Software www.jstatsoft.org •Morethan100bookswithaccompanyingcode •Verylarge,activeuserbase.

  4. WhynotR? •NCL,IDL,Matlab,SAS,…areallviable alternativestoR.Ifyouareapartofanactive communityofresearchersusinganother language,dolikewise. •Ifwewerebiostatisticianswewouldbeusing SAS.BookTitle:“AnalyzingReceiverOperatingCharacteristicCurveswithSAS” •Considerbuildingverificationfunctionsand utilitiesaspartofcodedevelopment. Verificationneednotbeanexternalprocessto forecasting.

  5. TheRCommunity •Developers –RCoreGroup(17members),only2haveleftsince 1997 –MajorupdateinApril/October(freezedates,beta versions,bugtracking,...) •Mailinglists –Helplist~150messages/day,archived, searchable. •5InternationalConferences,2US,1China

  6. EverythingaboutRisatwww.r-project.org •Sourcecode •Binarycompilations(Windows,MacOS,Linux •Documentation(Maindocuments,plusnumerous contributed.Someinforeignlanguages.) •Newsletter(replacedbyRJournal.) •Mailinglist(Severalsearchengines) •Packagesoneverytopicimaginable •Wikiwithexamples •ReferencelistofbooksusingR.(morethan100) •TaskManager

  7. UseRwithscripts •InLinux-EmacsSpeaksStatistics –Provides syntax-based –Objectnamecompletion –Keystrokeshortcuts –Commandhistory –Alt-xRtoinvokeRwithXemacs. •InWindows,useeditor –AddedGUIfeatures –<control>RsendsalineorhighlightedsectionintoR. –InstallpackagewithGUIs –Savegraphicsbypointandclick. •MacOS –SimilartoWindowswithadvantages ofsystemcalls.

  8. PackagesinR •Contributedbypeopleworldwide. •Allowscientistsorstatisticianstopushtheir ideas. •ApplyandextendRcapabilitiestomeetthe needsofspecificcommunities. •Accompanymanystatisticaltextbooks

  9. Asampleofusefulpackages • • • • • •Rgis,spatstat(GIS) •ncdf(supportfor netcdffiles) •Rcolorbrewer •randomForests verification fields(spatialstats) radiosondes extRemes BMA(BayesianModel Averaging) •BMAensemble •circular •Rsqlite

  10. Packages •Packagesmustbeinstalled tocall. •Packagesmustbecalledtouse. •Basepackagesareinstalledbydefault.

  11. 10mostusefulfunctioninR •aggregate-appliesafunctiontogroupsof datasubsetbycategories. •apply-incrediblyefficientinavoidingloops. Appliesfunctionsacrossdimensionsofarrays. •layout-creativelydivideaprintregion. •xyplot(inthelatticepackage)slightlyadvance graphictechniques •%in%returnslogicalshowingwhichelements inAareinB.(e.gA%in%B)

  12. Moretop10 • • • • • table–createcontingencytabelcounts. boot–applybootstrapfunctioncorrectly read.fwf–readfixedwidthformatdata par–controleverythinginagraph system()–allowsyoutocallsystem commandfromR •pairs–themostunderutilizedplot–plotsa matrixof4columnsina4x4plotlayout

  13. Login, start your windowing system. $ R Start R as appropriate for your platform. The R program begins, with a banner. (Within R, the prompt on the left hand side will not be shown to avoid confusion.) help.start() Start the HTML interface to on-line help (using a web browser available at your machine). You should briefly explore the features of this facility with the mouse. In particular, work through 1.5, 2.1 – 2.3, and appendix A (just the first one or two sections)

  14. RExercises • • • • • Choosegroupsof3-4–findacomputer Logontomachines Bringupatleast2xterms >cd/home/user/Desktop/longlead >viintro2R.2013.R And work through the commands given …

More Related