/
Package dummies February   Type Package Title Create d Package dummies February   Type Package Title Create d

Package dummies February Type Package Title Create d - PDF document

debby-jeon
debby-jeon . @debby-jeon
Follow
461 views
Uploaded On 2015-06-05

Package dummies February Type Package Title Create d - PPT Presentation

56 Date 20120614 Author Christopher Brown Maintainer Christopher Brown Depends utils Description Expands factors characters and other eligible classes into dummyindicator variables URL httpwwwdecisionpatternscom License GPL 2 LazyLoad no Repository ID: 80593

Date 20120614 Author Christopher

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Package dummies February Type Package ..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

2dummies-package dummies-packageCreateandmanipulatedummyvariablesexiblyandefciently DescriptionContainsfunctionstocreatedummyvariablesexiblyusingmodel.matrixreturningthemaseithermatricesordataframesforfurtheranalysis.Alsoi,containsmethods,formanipulatingdummyvariables.DetailsPackage:dummiesType:PackageVersion:1.5.6Date:2012-06-14License:GPL�(=2)LazyLoad:noAuthor(s)Author:ChristopherBrownMaintainer:ChristopherBrownReferenceshttp://wiki.r-project.org/rwiki/doku.php?id=tips:data-manip:create_indicatorhttp://blog.opendatagroup.com/2009/09/30/r-the-dummies-packageSeeAlsodummyExamples#Seeexamplesinthedocumentationfordummy 4dummyDetailsdummytakeasinglevariableORthenameofsinglevariableandadataframe.Itcoercesthevariabletoafactorandreturnsamatrixofdummyvariablesusingmodel.matrix.Ifthedatahasrownames,theseareretained.Optionally,theparameterdropindicatesthatthatdummyvariableswillbecreatedforonlytheexpressedlevelsoffactors.Settingittofalsewillproducedummyvariablesforalllevelsofallfactors.Ifthereisonlyonelevelforthevariableandverbose==TRUE,awarningisissuedbeforecreatingthedummyvariable.Eachelementofthisdummyvariable,willhavethesamevalue.Aseperator,sep,canbespeciedfortheseperatorbetweenthevariablenameandthevaluefortheconstructionofnewvariablenames.Thedefaultistoprovidenoseperator.Thetypeofvaluesreturnedcanbeaffectedusingthefunargument.funiscalledoneachofthere-sultantdummyvariables.Theonlyusefulfunctionsthattheauthorhasemployedareas.interger(thedefault)oras.logical.dummy.data.frametakesadata.frameormatrixandreturnsadata.frameinwhichallspeciedcolumnsareexpandedasdummyvariables.Speciccolumnscanbenamedwiththenamesargu-mentorspeciedonaclassbasisbythedummy.classesargument.Speciednamestakeprecedentoverclasses.Thedefaultistoexpanddummyvariablesforcharacterandfactorclasses,andcanbecontrolledgloballybyoptions('dummy.classes').IftheargumentallisFALSE.Theresultingdata.framewillcontainonlythenewdummyvariables.Bydefault,allcolumnsoftheobjectarereturnedintheorderoftheoriginalframe.Dummyvariablesareexpandedinplace.omit.constantsindicateswhethertoomitdummyvariablesthatassumeonlyasinglevalue.Thisisthedefault.Ifdrop==FALSE,constantvariablesareretainedregardlessofthesetting.Valuedummyreturnsamatrixwiththenumberofrowsequaltothethatofgivenvariable.Bydefault,thematrixcontainsintegers,buttheexacttypecanbeaffectedbyfunargument.Rownamesareretainedifthesuppliedvariablehasassociaterownames.dummy.data.framereturnsadata.frameinwhichvariablesareexpandedtodummyvariablesiftheyareoneofthedummyclasses.Thecolumnsarereturninthesameorderastheinputwithdummyvariablecolumnsreplacingtheoriginalcolumn.Author(s)ChristopherBrownReferenceshttp://wiki.r-project.org/rwiki/doku.php?id=tips:data-manip:create_indicatorhttp://tolstoy.newcastle.edu.au/R/help/00b/1199.htmlhttp://tolstoy.newcastle.edu.au/R/help/03a/6409.htmlhttp://tolstoy.newcastle.edu.au/R/help/01c/0580.htmlManyotherdiscussionsonR-Help.Toomanytolist. 6which.dummyUsageget.dummy(data,name=NULL)ArgumentsdataAdata.framewithandummiesattributesnameOptional.Thenameofavariable.DetailsThisuseswhich.dummytoidentifythedummycolumns.ValueThesubsetofdatathataredummycolumns.Author(s)ChristopherBrownSeeAlsowhich.dummy,dummy.data.frameExamplesdata(iris)ddummy.data.frame(iris)get.dummy(d,'Species') which.dummyIdentifywhichcolumnsaredummyvariablesonadataframe. DescriptionGivenadataframeandanoptionalvariablename,which.dummyidentieswhichcolummnsaredummyvariablesbythecolumnindex.Usagewhich.dummy(data,name=NULL)ArgumentsdataAnobjectwitha'dummies'attributenameOptional.Thenameofacolumnthathasbeenexpandedtoadummyvariable. IndexTopicattributewhich.dummy,6Topicmanipdummy,3get.dummy,5which.dummy,6Topicmodelsdummy,3Topicpackagedummies-package,2dummies(dummies-package),2dummies-package,2dummy,2,3,3,7dummy.data.frame,6,7factor,5get.dummy,5model.frame,5model.matrix,4,5which.dummy,6,68