{"id":15520935,"url":"https://github.com/samedwardes/foofactors","last_synced_at":"2025-10-29T14:36:34.346Z","repository":{"id":104820613,"uuid":"242879882","full_name":"SamEdwardes/foofactors","owner":"SamEdwardes","description":"What the Package Does (One Line, Title Case)","archived":false,"fork":false,"pushed_at":"2020-02-25T01:19:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T12:13:42.026Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamEdwardes.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-02-25T01:14:37.000Z","updated_at":"2020-02-25T01:20:01.000Z","dependencies_parsed_at":"2023-05-30T06:45:18.966Z","dependency_job_id":null,"html_url":"https://github.com/SamEdwardes/foofactors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamEdwardes/foofactors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Ffoofactors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Ffoofactors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Ffoofactors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Ffoofactors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamEdwardes","download_url":"https://codeload.github.com/SamEdwardes/foofactors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Ffoofactors/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266287824,"owners_count":23905461,"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":[],"created_at":"2024-10-02T10:30:40.343Z","updated_at":"2025-10-29T14:36:29.313Z","avatar_url":"https://github.com/SamEdwardes.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput:\n  md_document:\n    variant: markdown_github\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n**NOTE: This is a toy package created for expository purposes, for the second edition of [R Packages](https://r-pkgs.org). It is not meant to actually be useful. If you want a package for factor handling, please see [forcats](https://forcats.tidyverse.org).**\n\n### foofactors\n\nFactors are a very useful type of variable in R, but they can also be very aggravating. This package provides some helper functions for the care and feeding of factors.\n\n### Installation\n\n```{r installation, eval = FALSE}\ndevtools::install_github(\"jennybc/foofactors\")\n```\n  \n### Quick demo\n\nBinding two factors via `fbind()`:\n\n```{r}\nlibrary(foofactors)\na \u003c- factor(c(\"character\", \"hits\", \"your\", \"eyeballs\"))\nb \u003c- factor(c(\"but\", \"integer\", \"where it\", \"counts\"))\n```\n\nSimply catenating two factors leads to a result that most don't expect.\n\n```{r}\nc(a, b)\n```\n\nThe `fbind()` function glues two factors together and returns factor.\n\n```{r}\nfbind(a, b)\n```\n\nOften we want a table of frequencies for the levels of a factor. The base `table()` function returns an object of class `table`, which can be inconvenient for downstream work.\n\n```{r}\nset.seed(1234)\nx \u003c- factor(sample(letters[1:5], size = 100, replace = TRUE))\ntable(x)\n```\n\nThe `fcount()` function returns a frequency table as a tibble with a column of factor levels and another of frequencies:\n\n```{r}\nfcount(x)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamedwardes%2Ffoofactors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamedwardes%2Ffoofactors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamedwardes%2Ffoofactors/lists"}