{"id":14068204,"url":"https://github.com/mkearney/callmethod","last_synced_at":"2025-10-29T15:46:47.101Z","repository":{"id":124078222,"uuid":"149007447","full_name":"mkearney/callmethod","owner":"mkearney","description":"🤙 Call Method for Developing Packages","archived":false,"fork":false,"pushed_at":"2018-09-16T15:17:30.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T23:43:26.769Z","etag":null,"topics":["devtools","methods","package-development","r-methods","r-package","r-packages","r-programming","rstats"],"latest_commit_sha":null,"homepage":"https://github.com/mkearney/callmethod","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/mkearney.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":"2018-09-16T15:12:20.000Z","updated_at":"2024-03-26T21:51:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce018360-6b09-4295-9eb0-100af4d6fd6b","html_url":"https://github.com/mkearney/callmethod","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mkearney/callmethod","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fcallmethod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fcallmethod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fcallmethod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fcallmethod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkearney","download_url":"https://codeload.github.com/mkearney/callmethod/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fcallmethod/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281651089,"owners_count":26537963,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["devtools","methods","package-development","r-methods","r-package","r-packages","r-programming","rstats"],"created_at":"2024-08-13T07:06:01.410Z","updated_at":"2025-10-29T15:46:47.067Z","avatar_url":"https://github.com/mkearney.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\nlibrary(callmethod)\n```\n# callmethod\n\n\u003e A methods package with some simpler syntax at the cost of being a less transferable\n\n## Installation\n\nYou can install the released version of callmethod from Github with:\n\n``` r\n## install from Github\nremotes::install_github(\"mkearney/callmethod\")\n```\n\n## Examples\n\nDefine a method that's a wrapper around `base::rnorm()`:\n\n```{r rnorm}\n## define method\nr_norm \u003c- function(n, m = 0, sd = 1) call_method(\"r_norm\")\n\n## set default\nr_norm.default \u003c- function(...) rnorm(...)\n\n## call method\nr_norm(10, 3)\n```\n\nDefine a method that generates random ID strings:\n\n```{r random_string}\n## define method\nrstring \u003c- function(n, collapse = \"\") call_method(\"random_string\")\n\n## define method default\nrandom_string.default \u003c- function(...) {\n  list(...)[[1]]\n}\n\nrandom_string.character \u003c- function(...) {\n  dots \u003c- list(...)\n  n \u003c- nchar(dots[[1]])\n  collapse \u003c- dots[[2]]\n  random_string.numeric(n, collapse)\n}\n\n## define method for numeric\nrandom_string.numeric \u003c- function(...) {\n  dots \u003c- list(...)\n  n \u003c- dots[[1]]\n  collapse \u003c- dots[[2]]\n  fl \u003c- sample(letters, 2, replace = TRUE)\n  paste(c(fl[1],\n    sample(c(rep(0:9, 3), letters, toupper(letters)), n - 2, replace = TRUE),\n\t   fl[2]), collapse = collapse)\n}\n\n## call random_string method\nrstring(20)\n\nrstring(\"thislong\")\n```\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkearney%2Fcallmethod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkearney%2Fcallmethod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkearney%2Fcallmethod/lists"}