economics exercise and need the explanation and answer to help me learn.
Hello I need help with this assignment, the use of R is needed
Requirements: Complete assignment | .doc file
ECON4331W–Assignment1Writtenby:HannesMalmbergUpdatedon09/12/2023DatavisualizationofGDPdataWehavediscussedtheevolutionofmateriallivingstandardsovertimeandacrosscountries.Inthisexercise,youwilldoindependentworkondataonGDPpercapita,astandardmeasureoflivingstandards.Youshouldsubmitazipped-folderwithyourassignment.ThezipfolderbenamedFirstName_LastName_A1.zip.Itshouldcontain•Thescriptwithyourcode,“FirstName_LastName_A1.R”•An.Rprojfilecalled“FirstName_LastName_A1.Rproj”(thiswillsimplybealinktoensurethatthegradersetsitupintherightfolder,seeChapter8in“RforDataScience”)•Apdffilewiththeanswerstoalltheexercises,“FirstName_LastName_A1.pdf.”Thisfileshouldincludewrittenanswerstoeachquestion(inEnglish,nocode)and/orthegraphsthattheexerciseisaskingyoutogenerate.Youareresponsiblefornamingyourfilesappropriately,andthatthecodeshouldrunwithouterrors.TheexerciseusesR.ForinstructionsonhowtogetstartedwithR,pleaserefertoSection1.4-1.6in“RforDataScience”.Thisexerciseisare-writeofChapter3in”RforDataScience”usingotherexamples.Ifyouareinterestedintheorignalresource,youcanfinditathttp://r4ds.had.co.nz/data-visualisation.htmlIntroduction“Thesimplegraphhasbroughtmoreinformationtothedataanalyst’smindthananyotherdevice.”—JohnTukeyThisexercisewillteachyouhowtovisualizeyourdatausingggplot2.Rhasseveralsystemsformakinggraphs,butggplot2isoneofthemostelegantandmostversatile.Theggplot2packageimplementsthegrammarofgraphics,acoherentsystemfordescribingandbuildinggraphs.Withggplot2,youcandomorefasterbylearningonesystemandapplyingitinmanyplaces.Ifyou’dliketolearnmoreaboutthetheoreticalunderpinningsofggplot2beforeyoustart,I’drecommendreading“TheLayeredGrammarofGraphics”,http://vita.had.co.nz/papers/layered-grammar.pdf.PrerequisitesTheggplot2packageisoneofthepackagesin“tidyverse”,acollectionofpackagescreatedbyHadleyWickmantododatascienceinR.Toloadtidyverse,write1
library(tidyverse)Thatonelineofcodeloadsthecoretidyverse;packageswhichyouwilluseinalmosteverydataanalysis.Ifyourunthiscodeandgettheerrormessage‘thereisnopackagecalled“tidyverse”’,you’llneedtofirstinstallit,thenrunlibrary()onceagain.install.packages(“tidyverse”)library(“tidyverse”)Youonlyneedtoinstallapackageonce,butyouneedtoreloaditeverytimeyoustartanewsession.FirststepsLet’suseourfirstgraphtoansweraquestion:Docountrieswithhigherincomelevelshavealongerlifeexpectancythancountrieswithlowincomelevels?Youprobablyalreadyhaveananswer,buttrytomakeyouranswerprecise.Whatdoestherelationshipbetweenincomelevelsandlifeexpectancylooklike?Isitpositive?Negative?Linear?Nonlinear?TheGapminderdataYoucantestyouranswerusingdatafromGapminder.Gapminderisafoundationthatworksonmakingdataondevelopmentbroadlyaccessible.GapminderhasdataonGDPpercapitadatatakenfromthePennWorldTable(PWT),thedatasourcethatwetalkedaboutinlectures.Rhasacustom-designedpackagetoaccesstheGapminderdataonGDPpercapitaandlifeexpectancy.Installthegapminderpackageaswedidaboveandthenloaditbywritingthefollowingcommand:library(“gapminder”)Loadingthispackagegivesusaccesstothegapminderdataframe.Adataframeisarectangularcollectionofvariables(inthecolumns)andobservations(intherows).gapmindercontainsobservationscollectedbytheGapminderonGDPpercapitaandlifeexpectancyinaselectionofcountriesfordifferentyears.Printthedataframebywriting:gapminder###Atibble:1,704×6##countrycontinentyearlifeExppopgdpPercap##
Tolearnmoreaboutgapminder,openitshelppagebyrunning?gapminder.Inourexercise,wewillstartbyfocusingonthelatestsetofobservationsfrom2007.Torestrictattentiontotheseobservations,runthecodegapminder07<-dplyr::filter(gapminder,year==2007)Inalaterexercise,youwilllearnhowthefunction“filter”works.Fornow,itisenoughtoknowthattheoperationabovecreatesadataframe“gapminder07”whichcontainsallobservationsfrom2007.Printthedataframeintheconsole.CreatingaggplotToplotgapminder,runthiscodetoputgdpPercaponthex-axisandlifeExponthey-axis:ggplot(data=gapminder07)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp))Theplotshowsapositiverelationshipbetweencountryincomelevel(gdpPercap)andlifeexpectancy(lifeExp).Inotherwords,countrieswithhighincomeslivelonger,onaverage.Doesthisconfirmorrefuteyourhypothesisaboutincomelevelsandlifeexpectancy?Withggplot2,youbeginaplotwiththefunctionggplot().ggplot()createsacoordinatesystemthatyoucanaddlayersto.Thefirstargumentofggplot()isthedatasettouseinthegraph.Soggplot(data=gapminder07)createsanemptygraph,butit’snotveryinterestingsoI’mnotgoingtoshowithere.3
Youcompleteyourgraphbyaddingoneormorelayerstoggplot().Thefunctiongeom_point()addsalayerofpointstoyourplot,whichcreatesascatterplot.ggplot2comeswithmanygeomfunctionsthateachaddadifferenttypeoflayertoaplot.Youcanalsoaddmodifiersthatchangetheaxes,addlabels,andmanyotherusefulthings.Thepowerfulpropertyofggplot2liesinthispossibilityofbuildingupchartsstep-by-step.Eachgeomfunctioninggplot2takesamappingargument.Thisdefineshowvariablesinyourdatasetaremappedtovisualproperties.Themappingargumentisalwayspairedwithaes(),andthexandyargumentsofaes()specifywhichvariablestomaptothexandyaxes.ggplot2looksforthemappedvariableinthedataargument,inthiscase,gapminder07.AgraphingtemplateLet’sturnthiscodeintoareusabletemplateformakinggraphswithggplot2.Tomakeagraph,replacethebracketedsectionsinthecodebelowwithadataset,ageomfunction,oracollectionofmappings.ggplot(data=)+
Figure1:5
ggplot(data=gapminder07)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp,color=continent))(IfyoupreferBritishEnglish,youcanusecolourinsteadofcolor.)Tryitoutinyourcode!Whichcontinentsarerelativelyrichandrelativelypoor?Howdoesthevariationlookwithindifferentcontinents?Ingeneral,tomapanaesthetictoavariable,associatethenameoftheaesthetictothenameofthevariableinsideaes().Intheexampleabove,weused“color”,butthereareotheraestheticssuchasshapeandsizethatwecanalsomapvariables.Wheneverwedoso,ggplot2willautomaticallyassignauniqueleveloftheaesthetic(hereauniquecolor)toeachuniquevalueofthevariable,aprocessknownasscaling.Inthecaseofcontinents,everyuniquecontinent(i.e.,everyuniquelevelofthevariable“continent”)isassignedtoauniquecolor.Automatically,ggplot2willalsoaddalegendthatexplainswhichlevelscorrespondtowhichvalues.Intheaboveexample,wemappedcontinenttothecolorandaesthetics,butwecouldhavemappedcontinenttothesizeaestheticinthesameway.Inthiscase,theexactsizeofeachpointwouldrevealitscontinent.Wegetawarninghere,becausemappinganunorderedvariable(continent)toanorderedaesthetic(size)isnotagoodidea.ggplot(data=gapminder07)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp,size=continent))Orwecouldhavemappedcontinenttothealphaaesthetic,whichcontrolsthetransparencyofthepoints,ortheshapeofthepoints.#Leftggplot(data=gapminder07)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp,alpha=continent))6
Foreachaesthetic,youuseaes()toassociatethenameoftheaestheticwithavariabletodisplay.Theaes()functiongatherstogethereachoftheaestheticmappingsusedbyalayerandpassesthemtothelayer’smappingargument.Whenwewritexandytogetherwithcolorandshape,weseegetusefulinsightaboutthestructureofgraphs.Thexandylocationsofapointarethemselvesaesthetics,inthesensethattheyarevisualproperties(inthiscase,location),thatcanberelatedtothevalueofvariablesinyourdatasets.Inthatsense,xandyaresimilartoshapeandcolorinthattheyarevisualpropertiesrevealingsomethingaboutthedata.Onceyoumapanaesthetic,ggplot2takescareoftherest.Itselectsareasonablescaletousewiththeaesthetic,anditconstructsalegendthatexplainsthemappingbetweenlevelsandvalues.Forxandyaesthetics,ggplot2doesnotcreatealegend,butitcreatesanaxislinewithtickmarksandalabel.Theaxislineactsasalegend;itexplainsthemappingbetweenlocationsandvalues.Youcanalsosettheaestheticpropertiesofyourgeommanually.Forexample,wecanmakeallofthepointsinourplotblue:ggplot(data=gapminder07)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp),color=”blue”)Here,thecolordoesn’tconveyinformationaboutavariable,butonlychangestheappearanceoftheplot.Tosetanaestheticmanually,settheaestheticbynameasanargumentofyourgeomfunction;i.e.itgoesoutsideofaes().You’llneedtopickalevelthatmakessenseforthataesthetic:•Thenameofacolorasacharacterstring.•Thesizeofapointinmm.•Theshapeofapointasanumber,asshowninFigure@ref(fig:shapes).7
CommonproblemsAsyoustarttorunRcode,you’relikelytorunintoproblems.Don’tworry—ithappenstoeveryone.IhavebeenwritingRcodeforyears,andeverydayIstillwritecodethatdoesn’twork!Startbycarefullycomparingthecodethatyou’rerunningtothecodeinthebook.Risextremelypicky,andamisplacedcharactercanmakeallthedifference.Makesurethatevery(ismatchedwitha)andevery”ispairedwithanother”.Sometimesyou’llrunthecodeandnothinghappens.Checktheleft-handofyourconsole:ifit’sa+,itmeansthatRdoesn’tthinkyou’vetypedacompleteexpressionandit’swaitingforyoutofinishit.Inthiscase,it’susuallyeasytostartfromscratchagainbypressingESCAPEtoabortprocessingthecurrentcommand.Onecommonproblemwhencreatingggplot2graphicsistoputthe+inthewrongplace:ithastocomeattheendoftheline,notthestart.Inotherwords,makesureyouhaven’taccidentallywrittencodelikethis:ggplot(data=gapminder07)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp))Ifyou’restillstuck,trythehelp.YoucangethelpaboutanyRfunctionbyrunning?function_nameintheconsole,orselectingthefunctionnameandpressingF1inRStudio.Don’tworryifthehelpdoesn’tseemthathelpful-insteadskipdowntotheexamplesandlookforcodethatmatcheswhatyou’retryingtodo.Ifthatdoesn’thelp,carefullyreadtheerrormessage.Sometimestheanswerwillbeburiedthere!Butwhenyou’renewtoR,theanswermightbeintheerrormessagebutyoudon’tyetknowhowtounderstandit.AnothergreattoolisGoogle:trygooglingtheerrormessage,asit’slikelysomeoneelsehashadthesameproblem,andhasgottenhelponline.Section2exercises1.(15pts.)Googlethegeom_textcommandandusethistoplotthegraphwithcountrynamesinsteadofpoints,asbelow.NotethattheGDPvariableisveryunevenlydistributedacrossthehorizontalaxis.UseGoogletofindouthowtoconvertthehorizontalaxistoalog-scaleinggplot2(don’tforgettoappropriatelyrenameaxislabelsaswell,andasalwaysineconomics,makesuretousethenaturallogfunction.)Then,Googlethegeom_smoothcommandandusethistoaddalinearfittedlinetothisgraph.Afteryouhavedrawntheplot,writeggsave(“gapminder_filename.pdf”).Thiscommandsavesthelatestggplotasapdf.Thefilewillgointoyourcurrentworkingdirectory,whichyoucanfindbywritinggetwd().Addacopyofyourfinalplotinthefilesummarizingyouranswers.Note:thisappliestoallquestionswhereyouareaskedtocreateagraphorothertypeofoutput.(5pointsforreplacingthepointswithcountrynamelabel,5pointsforconvertingthehorizontalaxistoalog-scale,5pointsforaddingalinearfittedline)2.(5pts.)Somecountriesareconsiderablybelowtheline.Whydoyouthinktheyaresomuchbelow?TrycheckingtheWikipediaoftwoofthesecountriesandgiveanhypothesis.3.(5pts.)Whatdoesthefollowinglineofcodedowhenaddedtoggplot?scale_x_continuous(trans=’log’,breaks=1000*2**(0:10))4.(5pts.)Googlethe“labs”commandanduseittoaddinformativexandylabelstoyourpreviousgraph.Alsousethe“caption”argumentinthelabscommandtoadd“Source:Gapminder”tothelowerrightcornerofthegraph.(2.5pointsforcorrectlyaddingthelabel,2.5pointsforcorrectlyaddingthecaption)8
FacetsOnewaytoaddadditionalvariablesiswithaesthetics.Anotherway,particularlyusefulforcategoricalvariables(e.g.,continent,poorvsrich,ratherthannumerical,GDPpercapita,lifeexpectancy),istosplityourplotintofacets,subplotsthateachdisplayonesubsetofthedata.Tofacetyourplotbyasinglevariable,usefacet_wrap().Thefirstargumentoffacet_wrap()shouldbeaformula,whichyoucreatewith~followedbyavariablename(here“formula”isthenameofadatastructureinR,notasynonymfor“equation”).Thevariablethatyoupasstofacet_wrap()shouldbediscrete.ggplot(data=gapminder07)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp))+facet_wrap(~continent,nrow=2)9
Tofacetyourplotonthecombinationoftwovariables,addfacet_grid()toyourplotcall.Thefirstargumentoffacet_grid()isalsoaformula.Thistimetheformulashouldcontaintwovariablenamesseparatedbya~.Totrythis,wecancreatetheGapminderdatawithtwodifferentyears,1952and2007:gapminder5207=dplyr::filter(gapminder,year%in%c(1952,2007))Thenyoucanfacetontwovariablestocreateatwo-by-twographs.ggplot(data=gapminder5207)+geom_point(mapping=aes(x=log(gdpPercap),y=lifeExp))+scale_x_continuous(trans=’log’,breaks=1000*2**(0:10))+facet_grid(year~continent)10
Ifyouprefertonotfacetintherowsorcolumnsdimension,usea.insteadofavariablename,e.g.+facet_grid(.~cyl).Section3exercises1.(5pts.)Whathappensifyoufacetonacontinuousvariableandwhy?2.(5pts.)FirstcreatetheGapminderdatawithtwodifferentyears,1957and2002andcallit“gapmin-der5702”.Then,tryrunningthecodebelow.Whatdoes.do?ggplot(data=gapminder5702)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp))+scale_x_continuous(trans=’log’,breaks=1000*2**(0:10))+facet_grid(year~.)ggplot(data=gapminder5702)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp))+scale_x_continuous(trans=’log’,breaks=1000*2**(0:10))+facet_grid(.~continent)ggplot(data=gapminder5702)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp,color=factor(year)))+scale_x_continuous(trans=’log’,breaks=1000*2**(0:10))+facet_grid(.~continent)11
Whataretheadvantagestousingfacetinginsteadofthecolouraesthetic?Whatarethedisadvantages?Howmightthebalancechangeifyouhadalargerdataset?3.(5pts.)Read?facet_wrap.Whatdoesnrowdo?Whatdoesncoldo?Whatotheroptionscontrolthelayoutoftheindividualpanels?Whydoesn’tfacet_grid()havenrowandncolarguments?GeometricobjectsHowarethesetwoplotssimilar?Bothplotscontainthesamexvariable,thesameyvariable,andbothdescribethesamedata.Buttheplotsarenotidentical.Eachplotusesadifferentvisualobjecttorepresentthedata.Inggplot2syntax,wesaythattheyusedifferentgeoms.Ageomisthegeometricalobjectthataplotusestorepresentdata.Peopleoftendescribeplotsbythetypeofgeomthattheplotuses.Forexample,barchartsusebargeoms,linechartsuselinegeoms,boxplotsuseboxplotgeoms,andsoon.Scatterplotsbreakthetrend;theyusethepointgeom.Asweseeabove,youcanusedifferentgeomstoplotthesamedata.Theplotontheleftusesthepointgeom,andtheplotontherightusesthesmoothgeom,asmoothlinefittedtothedata.Tochangethegeominyourplot,changethegeomfunctionthatyouaddtoggplot().Forinstance,tomaketheplotsabove,youcanusethiscode:#leftggplot(data=gapminder07)+geom_point(mapping=aes(x=gdpPercap,y=lifeExp))+scale_x_continuous(trans=’log’,breaks=1000*2**(0:10))#rightggplot(data=gapminder07)+geom_smooth(mapping=aes(x=gdpPercap,y=lifeExp))+scale_x_continuous(trans=’log’,breaks=1000*2**(0:10))Everygeomfunctioninggplot2takesamappingargument.However,noteveryaestheticworkswitheverygeom.Youcouldsettheshapeofapoint,butyoucouldn’tsetthe“shape”ofaline.Ontheotherhand,youcouldsetthelinetypeofaline.geom_smooth()willdrawadifferentline,withadifferentlinetype,foreachuniquevalueofthevariablethatyoumaptolinetype.Layeringgeom_pointandgeom_smoothallowsustohavetwodifferentgeomsinthesamegraph!Ifthismakesyouexcited,buckleup.Inthenextsection,wewilllearnhowtoplacemultiplegeomsinthesameplot.12
ggplot2providesover30geoms,andextensionpackagesprovideevenmore(seehttps://www.ggplot2-exts.orgforasampling).Thebestwaytogetacomprehensiveoverviewistheggplot2cheatsheet,whichyoucanfindathttp://rstudio.com/cheatsheets.Tolearnmoreaboutanysinglegeom,usehelp:?geom_smooth.Manygeoms,likegeom_smooth(),useasinglegeometricobjecttodisplaymultiplerowsofdata.Forthesegeoms,youcansetthegroupaesthetictoacategoricalvariabletodrawmultipleobjects.ggplot2willdrawaseparateobjectforeachuniquevalueofthegroupingvariable.Inpractice,ggplot2willautomaticallygroupthedataforthesegeomswheneveryoumapanaesthetictoadiscretevariable(asinthelinetypeexample).Itisconvenienttorelyonthisfeaturebecausethegroupaestheticbyitselfdoesnotaddalegendordistinguishingfeaturestothegeoms.Section4Exercises1.(5pts.)Whatgeomwouldyouusetodrawalinechart?Aboxplot?Ahistogram?Anareachart?2.(5pts.)Whatdoesshow.legend=FALSEdo?Whathappensifyouremoveit?3.(5pts.)Whatdoestheseargumenttogeom_smooth()do?4.(5pts.)Willthesetwographslookdifferent?Why/whynot?ggplot(data=gapminder07,mapping=aes(x=gdpPercap,y=lifeExp))+geom_point()+geom_smooth()ggplot()+geom_point(data=gapminder07,mapping=aes(x=gdpPercap,y=lifeExp))+geom_smooth(data=gapminder07,mapping=aes(x=gdpPercap,y=lifeExp))5.(15pts.)RecreatetheRcodenecessarytogeneratethefollowinggraphs(Edit:theyaretwoseparategraphs,notfacets).(7.5pointsforcorrectlyrecreatingeachgraph)13
14
StatisticaltransformationsNext,let’stakealookatabarchart.Barchartsseemsimple,buttheyareinterestingbecausetheyrevealsomethingsubtleaboutplots.Considerabasicbarchart,asdrawnwithgeom_bar().Thefollowingchartdisplaysthetotalnumberofcountriesinthegapminder07dataset,groupedbycontinent.ggplot(data=gapminder07)+geom_bar(mapping=aes(x=continent))Onthex-axis,thechartdisplayscontient,avariablefromgapminder07.Onthey-axis,itdisplayscount,butcountisnotavariableingapminder07!Wheredoescountcomefrom?Manygraphs,likescatterplots,plottherawvaluesofyourdataset.Othergraphs,likebarcharts,calculatenewvaluestoplot:•barcharts,histograms,andfrequencypolygonsbinyourdataandthenplotbincounts,thenumberofpointsthatfallineachbin.•smoothersfitamodeltoyourdataandthenplotpredictionsfromthemodel.•boxplotscomputearobustsummaryofthedistributionandthendisplayaspeciallyformattedbox.Thealgorithmusedtocalculatenewvaluesforagraphiscalledastat,shortforstatisticaltransforma-tion.Youcanlearnwhichstatageomusesbyinspectingthedefaultvalueforthestatargument.Forexample,?geom_barshowsthatthedefaultvalueforstatis“count”,whichmeansthatgeom_bar()usesstat_count().stat_count()isdocumentedonthesamepageasgeom_bar(),andifyouscrolldownyoucanfindasectioncalled“Computedvariables”.Thatdescribeshowitcomputestwonewvariables:countandprop.15
Youcangenerallyusegeomsandstatsinterchangeably.Forexample,youcanrecreatethepreviousplotusingstat_count()insteadofgeom_bar():ggplot(data=gapminder07)+stat_count(mapping=aes(x=continent))Thisworksbecauseeverygeomhasadefaultstat;andeverystathasadefaultgeom.Thismeansthatyoucantypicallyusegeomswithoutworryingabouttheunderlyingstatisticaltransformation.Therearethreereasonsyoumightneedtouseastatexplicitly:1.Youmightwanttooverridethedefaultstat.Inthecodebelow,Ichangethestatofgeom_bar()fromcount(thedefault)toidentity.Thisletsmemaptheheightofthebarstotherawvaluesofayvariable.Unfortunatelywhenpeopletalkaboutbarchartscasually,theymightbereferringtothistypeofbarchart,wheretheheightofthebarisalreadypresentinthedata,orthepreviousbarchartwheretheheightofthebarisgeneratedbycountingrows.demo<-tribble(~country,~lifeExp,"USA",78.2,"Australia",80.4,"France",80.7,"Albania",76.4,"Bangladesh",64.1)16
ggplot(data=demo)+geom_bar(mapping=aes(x=country,y=lifeExp),stat="identity")(Don’tworrythatyouhaven’tseen<-ortribble()before.Youmightbeabletoguessattheirmeaningfromthecontext)2.Youmightwanttooverridethedefaultmappingfromtransformedvariablestoaesthetics.Forexample,youmightwanttodisplayabarchartofproportion,ratherthancount:ggplot(data=gapminder07)+geom_bar(mapping=aes(x=continent,y=..prop..,group=1))##Warning:Thedot-dotnotation(‘..prop..‘)wasdeprecatedinggplot23.4.0.##iPleaseuse‘after_stat(prop)‘instead.##Thiswarningisdisplayedonceevery8hours.##Call‘lifecycle::last_lifecycle_warnings()‘toseewherethiswarningwas##generated.17
Tofindthevariablescomputedbythestat,lookforthehelpsectiontitled“computedvariables”.3.Youmightwanttodrawgreaterattentiontothestatisticaltransformationinyourcode.Forexample,youmightusestat_summary(),whichsummarizestheyvaluesforeachuniquexvalue,todrawattentiontothesummarythatyou’recomputing:ggplot(data=gapminder07)+stat_summary(mapping=aes(x=continent,y=lifeExp),fun.ymin=min,fun.ymax=max,fun.y=median)##Warning:The‘fun.y‘argumentof‘stat_summary()‘isdeprecatedasofggplot23.3.0.##iPleaseusethe‘fun‘argumentinstead.##Thiswarningisdisplayedonceevery8hours.##Call‘lifecycle::last_lifecycle_warnings()‘toseewherethiswarningwas##generated.##Warning:The‘fun.ymin‘argumentof‘stat_summary()‘isdeprecatedasofggplot23.3.0.##iPleaseusethe‘fun.min‘argumentinstead.##Thiswarningisdisplayedonceevery8hours.##Call‘lifecycle::last_lifecycle_warnings()‘toseewherethiswarningwas##generated.##Warning:The‘fun.ymax‘argumentof‘stat_summary()‘isdeprecatedasofggplot23.3.0.##iPleaseusethe‘fun.max‘argumentinstead.18
##Thiswarningisdisplayedonceevery8hours.##Call‘lifecycle::last_lifecycle_warnings()‘toseewherethiswarningwas##generated.ggplot2providesover20statsforyoutouse.Eachstatisafunction,soyoucangethelpintheusualway,e.g.?stat_bin.Toseeacompletelistofstats,trytheggplot2cheatsheet.Section5exercises1.(5pts.)Whatdoesgeom_col()do?Howisitdifferenttogeom_bar()?Google!2.(5pts.)Inourproportionbarchart,weneedtosetgroup=1.Why?Inotherwordswhatistheproblemwiththisgraph?ggplot(data=gapminder07)+geom_bar(mapping=aes(x=continent,y=..prop..))19
We are a professional custom writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework.
Yes. We have posted over our previous orders to display our experience. Since we have done this question before, we can also do it for you. To make sure we do it perfectly, please fill our Order Form. Filling the order form correctly will assist our team in referencing, specifications and future communication.
1. Click on the “Place order tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
2. Fill in your paper’s requirements in the "PAPER INFORMATION" section and click “PRICE CALCULATION” at the bottom to calculate your order price.
3. Fill in your paper’s academic level, deadline and the required number of pages from the drop-down menus.
4. Click “FINAL STEP” to enter your registration details and get an account with us for record keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
5. From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.
Need this assignment or any other paper?
Click here and claim 25% off
Discount code SAVE25