资源描述:
《data manipulation with r Phil Spector》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、PhilSpectorDataManipulationwithR123PrefaceTheRlanguageprovidesarichenvironmentforworkingwithdata,especiallydatatobeusedforstatisticalmodelingorgraphics.Coupledwiththelargevarietyofeasilyavailablepackages,itallowsaccesstobothwell-establishedandexperimentalstatis
2、ticaltechniques.HowevertechniquesthatmightmakesenseinotherlanguagesareoftenveryinefficientinR,but,duetoR’sflex-ibility,itisoftenpossibletoimplementthesetechniquesinR.Generally,theproblemwithsuchtechniquesisthattheydonotscaleproperly;thatis,astheproblemsizegrows,th
3、emethodsslowdownataratethatmightbeunexpected.Thegoalofthisbookistopresentawidevarietyofdatama-nipulationtechniquesimplementedinRtotakeadvantageofthewaythatRworks,ratherthandirectlyresemblingmethodsusedinotherlanguages.SincethisrequiresabasicnotionofhowRstoresda
4、ta,thefirstchapterofthebookisdevotedtothefundamentalsofdatainR.Thematerialinthischapterisaprerequisiteforunderstandingtheideasintroducedinlaterchapters.SinceoneofthefirsttasksinanyprojectinvolvingdataandRisgettingthedataintoRinawaythatitwillbeusable,Chapter2cover
5、sreadingdatafromavarietyofsources(textfiles,spreadsheets,filesfromotherprograms,etc.),aswellassavingRobjectsbothinnativeformandinformatsthatotherprogramswillbeabletoworkwith.Chapter3addressestheissueofrelationaldatabases,sincelargedatasetsareoftenstoredinsuchdata
6、bases.Someguidanceinsettingupandusingdatabasestoworkwithlargedatasetsisalsoincludedinthischapter.Chapter4coversthetopicofdatesandtimesinR.Whilesomeworkcanbedoneusingasimplecharacterrepresentationofthistypeofdata,awiderrangeofoperationsareavailablewhendatesandti
7、mesareconvertedtoaninternalformthatallowsforcomparisonsandothermanipulations.ThereareavarietyofmechanismsforstoringdatesandtimesinR,andthischapterispresentedtoencourageusersofsuchdatatoconvertthemtotheappropriatetypeasearlyaspossible.VIPrefaceWhilefactorsareund
8、eniablyvaluableindatamodelingandgraphics,theyoften“getintheway”whenperformingmorebasicoperationsondata.Chap-ter5addresseshowtoconvertobjectstoandfromfactors,alongwithguide-l