{"id":15048721,"url":"https://github.com/zumbov2/findr","last_synced_at":"2025-04-10T01:33:42.797Z","repository":{"id":56937329,"uuid":"118837041","full_name":"zumbov2/findR","owner":"zumbov2","description":"Find code snipptes, R scripts, R markdown, PDF and text files by content with pattern matching","archived":false,"fork":false,"pushed_at":"2019-12-09T08:11:12.000Z","size":1702,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T03:11:38.512Z","etag":null,"topics":["find","markdown","package","pdf","r","scripts","txt"],"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/zumbov2.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}},"created_at":"2018-01-24T23:51:08.000Z","updated_at":"2024-08-03T20:59:01.000Z","dependencies_parsed_at":"2022-08-21T07:20:39.997Z","dependency_job_id":null,"html_url":"https://github.com/zumbov2/findR","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/zumbov2%2FfindR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zumbov2%2FfindR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zumbov2%2FfindR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zumbov2%2FfindR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zumbov2","download_url":"https://codeload.github.com/zumbov2/findR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140862,"owners_count":21054361,"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":["find","markdown","package","pdf","r","scripts","txt"],"created_at":"2024-09-24T21:15:43.614Z","updated_at":"2025-04-10T01:33:42.779Z","avatar_url":"https://github.com/zumbov2.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Lifecycle](https://img.shields.io/badge/lifecycle-retired-orange.svg)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/findR)](https://cran.r-project.org/package=findR)\n[![Build Status](https://travis-ci.org/zumbov2/findR.svg?branch=master)](https://travis-ci.org/zumbov2/findR)\n[![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)\n[![cranlogs](https://cranlogs.r-pkg.org/badges/grand-total/findR)](http://cran.rstudio.com/web/packages/findR/index.html)\n# findR\nThe `findR` functions `findRscript`, `findRmd`, `findPDF`, and `findtxt` scan all directories and subdirectories of a given path for R scripts, R Markdown, PDF and text files with content that matches a specific pattern. Files found can be copied to a folder. `reminder` prints examples of previously used code directly to the console.\n\n## Installation\nThe version 0.2.1 is on [CRAN](https://cran.r-project.org/web/packages/findR/index.html), and you can install it by:\n```r\ninstall.packages(\"findR\")\n```\nFor regularly updated version (latest: 0.2.1) install from GitHub:\n```r\ninstall.packages(\"devtools\")\ndevtools::install_github(\"zumbov2/findR\")\n```\n## Example `reminder`\n`reminder` serves as a memory aid for previously used code. Given a specific path, it searches for code examples of a function. By default, hits are displayed one after the other in the console. With `stepwise = F` it is possible to print all hits at once. You can use the arguments `before` and `after` to print preceding and/or subsequent lines of code.\n```r\nreminder(func = \"chordDiagram\", \n         path = \"myProjects\")\n```\n![](https://github.com/zumbov2/findR/blob/master/img/reminder.gif)\n\n## Example `findRscript`\nHmm, I've used the [circlize package](https://cran.r-project.org/web/packages/circlize/index.html) before, but I can't remember where or when! I apply `findRscript` to the main directory of my R projects.\n\n```r\nfindRscript(pattern = \"circlize\", \n            path = \"C:/Users/David Zumbach/Desktop/R\", \n            show.results = F,\n            copy = T,\n            folder = \"myChordScripts\")\n```\n[12 seconds later](https://www.youtube.com/watch?v=oeUcLaD9pR4):\n\n```r\nNumber of R scripts scanned: 1155\nNumber of R scripts with matching content: 20\nTotal number of matches: 40\n```\n![](https://github.com/zumbov2/findR/blob/master/img/folder.png)\n\n## Example `findPDF`\nToo many papers to read?\n\n![](https://github.com/zumbov2/findR/blob/master/img/f2.png)\n\n`findPDF` helps you focus!\n\n```r\nfindPDF(pattern = \"tensorflow\",\n        path = \"2017/machine_learning\", \n        copy = T, \n        folder = \"2017/tensorflow\")\n```\n15 seconds later and you've got your new reading list:\n\n![](https://github.com/zumbov2/findR/blob/master/img/f3.png)\n\n## Some gimmickry\nWhat `ggplot2` type am I? Let's find out with `findR`.\n\n```r\ngeom_types \u003c- c(\"geom_bar\", \"geom_line\", \"geom_point\", \"geom_histogram\")\nhits \u003c- vector(mode = \"numeric\", length = 4)\n\nfor (i in 1:length(geom_types)) {\n  \n  hits[i] \u003c- nrow(findRscript(pattern = geom_types[i], comments = F))\n  \n}\n```\n\nThe tension is getting higher.\n\n```r\nlibrary(tidyverse)\nggstats \u003c- data_frame(type = geom_types, freq = hits)\n\nggstats %\u003e%\n  mutate(type = factor(type, levels = type[order(freq, decreasing = T)])) %\u003e%\n  ggplot(aes(type, freq)) +\n  geom_bar(stat = \"identity\") +\n  theme_minimal() + \n  labs(x = \"\", y = \"\")\n  \nggsave(\"type.png\", dpi = 500)\n```\n\nTadaaa...\n\n![](https://github.com/zumbov2/findR/blob/master/img/type.png)\n \n Punkt. Aus. Ende.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzumbov2%2Ffindr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzumbov2%2Ffindr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzumbov2%2Ffindr/lists"}