{"id":16703883,"url":"https://github.com/ricschuster/foofactors","last_synced_at":"2026-04-23T12:33:23.858Z","repository":{"id":152122534,"uuid":"170758002","full_name":"ricschuster/foofactors","owner":"ricschuster","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-14T21:19:45.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-01T10:22:31.855Z","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/ricschuster.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":"2019-02-14T21:05:37.000Z","updated_at":"2019-02-14T21:19:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"cdbab144-9eb0-4bc2-b7e6-a010d3c1df81","html_url":"https://github.com/ricschuster/foofactors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ricschuster/foofactors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricschuster%2Ffoofactors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricschuster%2Ffoofactors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricschuster%2Ffoofactors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricschuster%2Ffoofactors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricschuster","download_url":"https://codeload.github.com/ricschuster/foofactors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricschuster%2Ffoofactors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32181371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T11:42:27.955Z","status":"ssl_error","status_checked_at":"2026-04-23T11:42:18.877Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12T19:10:09.144Z","updated_at":"2026-04-23T12:33:23.851Z","avatar_url":"https://github.com/ricschuster.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```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricschuster%2Ffoofactors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricschuster%2Ffoofactors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricschuster%2Ffoofactors/lists"}