{"id":16572846,"url":"https://github.com/coatless/tidysim","last_synced_at":"2025-03-05T14:26:15.990Z","repository":{"id":89518882,"uuid":"178494063","full_name":"coatless/tidysim","owner":"coatless","description":"Organizing simulation data in a tidy format","archived":false,"fork":false,"pushed_at":"2019-04-01T16:01:12.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T00:49:07.926Z","etag":null,"topics":["r","rstats","simulation"],"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/coatless.png","metadata":{"files":{"readme":"README.Rmd","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":"2019-03-30T00:56:48.000Z","updated_at":"2019-04-01T16:01:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"d1fe7c79-dbb8-4ba9-8434-962a188429bb","html_url":"https://github.com/coatless/tidysim","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/coatless%2Ftidysim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless%2Ftidysim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless%2Ftidysim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless%2Ftidysim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coatless","download_url":"https://codeload.github.com/coatless/tidysim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242041900,"owners_count":20062305,"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":["r","rstats","simulation"],"created_at":"2024-10-11T21:28:43.076Z","updated_at":"2025-03-05T14:26:15.983Z","avatar_url":"https://github.com/coatless.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# tidysim\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.org/coatless/tidysim.svg?branch=master)](https://travis-ci.org/coatless/tidysim)\n[![CRAN status](https://www.r-pkg.org/badges/version/tidysim)](https://cran.r-project.org/package=tidysim)\n\u003c!-- badges: end --\u003e\n\nThe goal of `tidysim` is to provide tools for manipulating simulation data \ninto a tidy format.\n\n## Installation\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"coatless/tidysim\")\n```\n\n## Examples\n\nThe common task when running simulation studies is to estimate parameters\nunderneath a specific method and then compare the results. Estimated parameter\ndata is stored in a `matrix` with each simulation iteration taking a column\nand each variable estimation taking a row or vice versa. \n\n```{r demo-load-sim}\n# Set Seed\nset.seed(5812)\n# Generate data\nmy_sim = matrix(rnorm(8), nrow = 2, ncol = 4)\n\n# Apply labels\nrownames(my_sim) = c(\"Beta0\", \"Beta1\")\ncolnames(my_sim) = paste0(\"Sim\", seq_len(ncol(my_sim)) )\n\n# Example data\nmy_sim\n```\n\nData stored in this manner is problematic as it isn't easily graphable under\na tidy approach.  \n\n\nWithin `tidysim`, the simulation matrix is converted into a\ntidy `data.frame`.  The `Round` variable indicates the simulation number\nand the `Parameter` variable stores the parameter being estimated. Once the\ndata is generated, it can be coerced into the appropiate shape with\n`sim_df(..., wide)`, where `wide` denotes whether to treat the simulation\ndata as having repeated estimates for parameter estimates given in the columns\nor stored row-wise.\n\n```{r show-wide-sim}\n# Load package\nlibrary(\"tidysim\")\n\n# Organize by row\nmy_sim_from_wide = sim_df(my_sim, wide = TRUE)\n\n# View first 5 rows\nhead(my_sim_from_wide, n = 5)\n\nautoplot(my_sim_from_wide)\n```\n\n\n## Authors\n\nJames Joseph Balamuta and David Dalpiaz\n\n## License\n\nGPL (\u003e= 2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless%2Ftidysim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoatless%2Ftidysim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless%2Ftidysim/lists"}