{"id":21723459,"url":"https://github.com/ingmarboeschen/graphing","last_synced_at":"2025-06-29T01:35:13.872Z","repository":{"id":163927122,"uuid":"337002670","full_name":"ingmarboeschen/graphing","owner":"ingmarboeschen","description":"A descriptive graphing function collection for R","archived":false,"fork":false,"pushed_at":"2025-01-13T09:58:58.000Z","size":53175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T19:09:32.759Z","etag":null,"topics":["barplot","descriptive-analysis","multigroup","networkplot","profileplot","regressionline","stackedareachart","worldmap"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ingmarboeschen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-08T08:09:21.000Z","updated_at":"2025-01-13T09:59:02.000Z","dependencies_parsed_at":"2024-12-17T10:39:00.123Z","dependency_job_id":null,"html_url":"https://github.com/ingmarboeschen/graphing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingmarboeschen%2Fgraphing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingmarboeschen%2Fgraphing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingmarboeschen%2Fgraphing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingmarboeschen%2Fgraphing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ingmarboeschen","download_url":"https://codeload.github.com/ingmarboeschen/graphing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244700649,"owners_count":20495577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barplot","descriptive-analysis","multigroup","networkplot","profileplot","regressionline","stackedareachart","worldmap"],"created_at":"2024-11-26T02:39:27.502Z","updated_at":"2025-03-20T22:19:58.900Z","avatar_url":"https://github.com/ingmarboeschen.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"## The 'graphing' package\nThis package contains some convenient graphic functions for the statistical software R.\n\n### Built With\n* [R Core 3.6](https://www.r-project.org)\n* [devtools](https://github.com/r-lib/devtools) package\n\n### Depends on\nThe function **igraph2()** depends on the R packages\n* [tm](https://cran.r-project.org/web/packages/tm/tm.pdf)\n* [igraph](https://igraph.org/r/)\n\nThe function **worldmap2()** depends on the R packages\n* [worldmap](https://cran.r-project.org/web/packages/rworldmap/rworldmap.pdf)\n* [countrycode](https://cran.r-project.org/web/packages/countrycode/countrycode.pdf)\n* [geosphere](https://cran.r-project.org/web/packages/geosphere/geosphere.pdf)\n* [rgeos](https://cran.r-project.org/web/packages/rgeos/rgeos.pdf)\n* [RColorBrewer](https://cran.r-project.org/web/packages/RColorBrewer/RColorBrewer.pdf)\n\nThe function **orcid2name()** depends on the R package\n* [rorcid](https://cran.r-project.org/web/packages/rorcid/rorcid.pdf)\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo install **graphing** run the following steps:\n\n### Installation\n1. Install and load the [devtools](https://github.com/r-lib/devtools) package\n``` r\n# Install the devtools package\ninstall.packages(\"devtools\")\n# Load the devtools package\nlibrary(devtools)\n``` \n2. Install **graphing** from [https://github.com/ingmarboeschen/graphing](https://github.com/ingmarboeschen/graphing)\n``` r\n# Install graphing from github\ninstall_github(\"ingmarboeschen/graphing\")\n```\n\u003c!-- Examples --\u003e\n## Examples\nThe examples listed below are minimal working examples. For a full documentation of each function, check the manual.\n\n### prettybarplot(), an adjustable labeled bar plot with background color option\n```r\nx\u003c-sample(letters[1:4],100,T)\ny\u003c-sample(1:3,100,T)\n# one dimensional absolute frequencies\nprettybarplot(table(x)) \n# two dimensional relative frequencies\nprettybarplot(prop.table(table(x,y))) \n``` \n\u003cimg src=\"./preview/prettybarplot1d.png\" height=\"400\"\u003e\u003cimg src=\"./preview/prettybarplot2d.png\" height=\"400\"\u003e\n\n\n### profileline(), course of descriptive parameters over several items\n```r\nmatrix\u003c-data.frame(matrix(sample(-3:3,1000,T),ncol=10))\nnames(matrix)\u003c-paste(\"Item\",1:10); g\u003c-paste(\"Group\",rep(1:3,length=100))\nfor(i in 1:dim(matrix)[2]){matrix[,i]\u003c-factor(matrix[,i],-3:3,c(\"fully disagree\",\"2\",\"3\",\"4\",\"5\",\"6\",\"fully agree\"))}\nprofileline(matrix,g,main=\"profileline()\",N_legend=T,type=\"Median\",ex=T,xlab=\"agreement\")\nprofileline(matrix,g,main=\"\",N_legend=T,pch=\"\",type=\"Mean\",ex=T,low=\"low\",high=\"high\",xlab=\"agreement\")\n``` \n\u003cimg src=\"./preview/profileline1.png\" height=\"400\"\u003e\u003cimg src=\"./preview/profileline2.png\" height=\"400\"\u003e\n\n### itemplot(), frequency distribution of categorical variable with descriptives\n```r\nx\u003c-factor(sample(letters[1:6],100,T))\nitemplot(x,main=\"itemplot()\",labels=c(\"I fully\\n disagree\",\"I fully\\n agree\"),legend=F)\nitemplot(x,main=\"itemplot()\",labels=c(\"I fully\\n disagree\",\"I fully\\n agree\"))\n``` \n\u003cimg src=\"./preview/itemplot1.png\" height=\"150\"\u003e\u003cimg src=\"./preview/itemplot2.png\" height=\"150\"\u003e\n\n### CIV(), confidence interval violin plot\n```r\nx\u003c-sample(paste(\"group\",1:4),100,T)\ny\u003c-10+as.numeric(factor(x))*2+rnorm(length(x))\nCIV(x,y,main=\"Confidence Intervall Violin Plot\")\n\n``` \n\u003cimg src=\"./preview/Confidence Intervall Violin Plot.png\" height=\"400\"\u003e\n\n### bp3d(), barplot for 3 dimensional contingency tables\n```r\nx \u003c- sample(paste(\"time\",1:4),240,T)\nz \u003c- rep(c(\"A\",\"B\"),each=120)\ny \u003c- paste(\"answer\",sample(1:7,240,T))\nbp3d(x,z,y,main=\"bp3d()\",xlab=\"treatment group\")\n\n``` \n\u003cimg src=\"./preview/bp3d.png\" height=\"400\"\u003e\n\n### stacked.area.chart(), stacked area chart for two dimensional contingency tables\n```r\nx\u003c-sample(2010:2020,1000,T,.2+(1:11)*.5)\ny\u003c-sample(paste(\"category\",LETTERS[1:10]),1000,T)\npar(mar=c(4,4,2,5))\nstacked.area.chart(table(x,y),main=\"stacked.area.chart()\",ylab=\"h(x)\",xlab=\"year\",reorder=T)\nstacked.area.chart(prop.table(table(x,y),m=1),main=\"stacked.area.chart()\",ylab=\"f(x)\",xlab=\"year\")\n\n``` \n\u003cimg src=\"./preview/stacked.area.chart1.png\" height=\"400\"\u003e\u003cimg src=\"./preview/stacked.area.chart2.png\" height=\"400\"\u003e\n\n### catplot(), conditioned/unconditioned frequency plot for two high dimensional categorial variables\n```r\nx\u003c-sample(2010:2020,1000,T,.2+(1:11)*.5)\ny\u003c-sample(paste(\"group\",LETTERS[1:10]),1000,T)\ncatplot(x,y,main=\"catplot()\",xlab=\"year\")\n``` \n\u003cimg src=\"./preview/catplot.png\" height=\"400\"\u003e\n\n### multi.line(), multi group comparison of regression/lowess lines\n```r\ndata(ChickWeight)\nattach(ChickWeight)\nDiet\u003c-paste(\"Diet\",ChickWeight$Diet)\nmulti.line(x=jitter(Time,2),y=weight,group=Diet,points=T,main=\"multi.line()\",xlab=\"time\",ylab=\"weight\")\nmulti.line(x=jitter(Time,2),y=weight,group=Diet,points=F,main=\"multi.line() without points with lowess line\",xlab=\"time\",ylab=\"weight\",type=\"lowess\")\n\n``` \n\u003cimg src=\"./preview/multi.line1.png\" height=\"400\"\u003e\u003cimg src=\"./preview/multi.line2.png\" height=\"400\"\u003e\n\n### igraph2(), simple network graph\n```r\nx\u003c-list(\n     c(\"Laura\",\"Ingmar\"),\n     c(\"Peter\",\"Renate\",\"Ingmar\",\"Andrea\"),\n     c(\"Nassim\",\"Ingmar\",\"Sergej\"),\n     c(\"Laura\",\"Rike\",\"Andra\"),\n     c(\"Marlene\",\"Nassim\",\"Christina\",\"Sabine\"),\n     c(\"Bela\",\"Ingmar\",\"Mariola\",\"Nassim\"),\n     c(\"Gloria\",\"Kim\",\"Olek\",\"Bolek\"))\nigraph2(x)\n``` \n\u003cimg src=\"./preview/igraph2.png\" height=\"400\"\u003e\n\n### worlmap2(), world map of country and country connection frequency\n```r\n x\u003c-list(c(\"Germany\",\"Austria\",\"S. Korea\"),\n c(\"Germany\",\"Austria\",\"S. Korea\"),c(\"Germany\",\"Austria\",\"S. Korea\"),\n c(\"Germany\",\"Spain\"),c(\"Germany\",\"Spain\"),c(\"United States\",\"Germany\"),\n c(\"Germany\",\"Cuba\",\"Bolivia\",\"South Africa\"))\nworldmap2(x)\n# Note: arguments legend1 and legend2 need adjustments that dependend on the resolution of the resulting graph. \n``` \n\u003cimg src=\"./preview/worldmap2.png\" height=\"400\"\u003e\n\n\n### orcid2name, ORCID author identification code to 'surname, name' conversion\n```r\n# Note: You need an ORCID account to authenticate to the ORCID api\nname\u003c-c(\"https://orcid.org/0000-0003-1159-3991\",\"Einstein, Albert\")\norcid2name(name)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingmarboeschen%2Fgraphing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fingmarboeschen%2Fgraphing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingmarboeschen%2Fgraphing/lists"}