{
  "_id": "6ad30ff662c1581dfb2fa3ae",
  "Package": "textreg",
  "Type": "Package",
  "Title": "n-Gram Text Regression, aka Concise Comparative Summarization",
  "Version": "0.1.6",
  "Date": "2026-09-16",
  "Authors@R": "person(given = \"Luke\",\nfamily = \"Miratrix\",\nrole = c(\"aut\", \"cre\"),\nemail = \"luke_miratrix@gse.harvard.edu\")",
  "Description": "Function for sparse regression on raw text, regressing a\nlabeling vector onto a feature space consisting of all possible\nphrases.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "VignetteBuilder": "knitr",
  "RoxygenNote": "7.3.3",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-10-17 05:59:29 UTC",
    "User": "root"
  },
  "Author": "Luke Miratrix [aut, cre]",
  "Maintainer": "Luke Miratrix <luke_miratrix@gse.harvard.edu>",
  "Repository": "https://cran.r-universe.dev",
  "Date/Publication": "2026-09-17 01:32:46 UTC",
  "RemoteUrl": "https://github.com/cran/textreg",
  "RemoteRef": "HEAD",
  "RemoteSha": "0caf4f12cd4128fd906535cba393b74a48c4230f",
  "_user": "cran",
  "_type": "src",
  "_file": "textreg_0.1.6.tar.gz",
  "_fileid": "https://r2.ropensci.org/976734d4ea3014d98fcf7601de9cf7c233886cdab5c76f2fed2d60135583d890",
  "_filesize": 1797425,
  "_sha256": "976734d4ea3014d98fcf7601de9cf7c233886cdab5c76f2fed2d60135583d890",
  "_expires": "2027-01-25T06:04:36.000Z",
  "_created": "2026-10-17T05:59:29.000Z",
  "_published": "2026-10-17T06:04:37.877Z",
  "_buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 117325077545,
      "time": 175,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "12091917224"
    },
    {
      "job": 117325077646,
      "time": 151,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "12092046780"
    },
    {
      "job": 117325077611,
      "time": 177,
      "config": "linux-release-arm64",
      "r": "4.6.1",
      "check": "WARNING",
      "artifact": "12091667827"
    },
    {
      "job": 117325077750,
      "time": 145,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "WARNING",
      "artifact": "12091762483"
    },
    {
      "job": 117324543969,
      "time": 193,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12091334945"
    },
    {
      "job": 117325077529,
      "time": 166,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "12091528672"
    },
    {
      "job": 117325077558,
      "time": 259,
      "config": "windows-devel-arm64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "12091249006"
    },
    {
      "job": 117325077566,
      "time": 132,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "12091474455"
    },
    {
      "job": 117325077557,
      "time": 259,
      "config": "windows-release-arm64",
      "r": "4.6.1",
      "check": "WARNING",
      "artifact": "12091643300"
    },
    {
      "job": 117325077639,
      "time": 105,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "WARNING",
      "artifact": "12091593114"
    }
  ],
  "_upstream": "https://github.com/cran/textreg",
  "_commit": {
    "id": "0caf4f12cd4128fd906535cba393b74a48c4230f",
    "author": "Luke Miratrix <luke_miratrix@gse.harvard.edu>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 0.1.6\n",
    "time": 1789608766
  },
  "_maintainer": {
    "name": "Luke Miratrix",
    "email": "luke_miratrix@gse.harvard.edu"
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 2.10",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "tm",
      "version": ">= 0.7",
      "role": "Imports"
    },
    {
      "package": "NLP",
      "version": ">= 0.1-10",
      "role": "Imports"
    },
    {
      "package": "Rcpp",
      "version": ">= 0.12.9",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "corrplot",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "SnowballC",
      "version": ">= 0.5.1",
      "role": "Suggests"
    },
    {
      "package": "xtable",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "plyr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": false,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-38",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "0.1.6",
      "date": "2026-09-17"
    }
  ],
  "_stars": 1,
  "_userbio": {
    "uuid": 6899542,
    "type": "organization",
    "name": "cran",
    "followers": 632,
    "description": "Unofficial read-only mirror of all CRAN R packages"
  },
  "_downloads": {
    "count": 653,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/textreg"
  },
  "_searchresults": 80,
  "_topics": [
    "cpp"
  ],
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/readme.html",
    "extra/readme.md",
    "extra/textreg.html",
    "LICENSE"
  ],
  "_realowner": "cran",
  "_cranurl": false,
  "_releases": [
    {
      "version": "0.1",
      "date": "2014-12-04"
    },
    {
      "version": "0.1.1",
      "date": "2015-02-02"
    },
    {
      "version": "0.1.2",
      "date": "2015-02-06"
    },
    {
      "version": "0.1.3",
      "date": "2015-11-11"
    },
    {
      "version": "0.1.4",
      "date": "2017-03-17"
    },
    {
      "version": "0.1.5",
      "date": "2018-10-04"
    },
    {
      "version": "0.1.6",
      "date": "2026-09-17"
    }
  ],
  "_exports": [
    "calc.loss",
    "clean.text",
    "cluster.phrases",
    "convert.tm.to.character",
    "find.CV.C",
    "find.threshold.C",
    "grab.fragments",
    "is.fragment.sample",
    "is.textreg.corpus",
    "is.textreg.result",
    "list.table.chart",
    "make.appearance.matrix",
    "make.count.table",
    "make.CV.chart",
    "make.list.table",
    "make.path.matrix",
    "make.phrase.correlation.chart",
    "make.phrase.matrix",
    "make.similarity.matrix",
    "path.matrix.chart",
    "phrase.count",
    "phrase.matrix",
    "phrases",
    "refit.model",
    "reformat.textreg.model",
    "sample.fragments",
    "save.corpus.to.files",
    "stem.corpus",
    "textreg"
  ],
  "_datasets": [
    {
      "name": "bathtub",
      "title": "Sample of cleaned OSHA accident summaries.",
      "object": "bathtub",
      "file": "bathtub.RData",
      "class": [
        "VCorpus",
        "Corpus"
      ],
      "fields": [],
      "table": false,
      "tojson": false
    },
    {
      "name": "dirtyBathtub",
      "title": "Sample of raw-text OSHA accident summaries.",
      "object": "dirtyBathtub",
      "file": "dirtyBathtub.RData",
      "class": [
        "data.frame"
      ],
      "fields": [],
      "rows": 127,
      "table": true,
      "tojson": true
    },
    {
      "name": "testCorpora",
      "title": "Some small, fake test corpora.",
      "object": "testCorpora",
      "file": "testCorpora.RData",
      "class": [
        "list"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "bathtub",
      "title": "Sample of cleaned OSHA accident summaries.",
      "concept": [
        "bathtub"
      ],
      "topics": [
        "bathtub"
      ]
    },
    {
      "page": "calc.loss",
      "title": "Calculate total loss of model (Squared hinge loss).",
      "topics": [
        "calc.loss"
      ]
    },
    {
      "page": "clean.text",
      "title": "Clean text and get it ready for textreg.",
      "topics": [
        "clean.text"
      ]
    },
    {
      "page": "cluster.phrases",
      "title": "Cluster phrases based on similarity of appearance.",
      "concept": [
        "Phrase Vizualization"
      ],
      "topics": [
        "cluster.phrases"
      ]
    },
    {
      "page": "convert.tm.to.character",
      "title": "Convert tm corpus to vector of strings.",
      "topics": [
        "convert.tm.to.character"
      ]
    },
    {
      "page": "dirtyBathtub",
      "title": "Sample of raw-text OSHA accident summaries.",
      "concept": [
        "bathtub"
      ],
      "topics": [
        "dirtyBathtub"
      ]
    },
    {
      "page": "find.CV.C",
      "title": "K-fold cross-validation to determine optimal tuning parameter",
      "topics": [
        "find.CV.C"
      ]
    },
    {
      "page": "find.threshold.C",
      "title": "Conduct permutation test on labeling to get null distribution of regularization parameter.",
      "topics": [
        "find.threshold.C"
      ]
    },
    {
      "page": "grab.fragments",
      "title": "Grab all fragments in a corpus with given phrase.",
      "topics": [
        "grab.fragments"
      ]
    },
    {
      "page": "is.fragment.sample",
      "title": "Is object a fragment.sample object?",
      "concept": [
        "sample.fragments"
      ],
      "topics": [
        "fragment.sample",
        "is.fragment.sample"
      ]
    },
    {
      "page": "is.textreg.corpus",
      "title": "Is object a textreg.corpus object?",
      "concept": [
        "textreg.corpus"
      ],
      "topics": [
        "is.textreg.corpus",
        "textreg.corpus"
      ]
    },
    {
      "page": "is.textreg.result",
      "title": "Is object a textreg.result object?",
      "concept": [
        "textreg.result"
      ],
      "topics": [
        "is.textreg.result",
        "textreg.result"
      ]
    },
    {
      "page": "list.table.chart",
      "title": "Graphic showing multiple word lists side-by-side.",
      "topics": [
        "list.table.chart"
      ]
    },
    {
      "page": "make_search_phrases",
      "title": "Convert phrases to appropriate search string.",
      "topics": [
        "make_search_phrases"
      ]
    },
    {
      "page": "make.appearance.matrix",
      "title": "Make phrase appearance matrix from textreg result.",
      "concept": [
        "Phrase Vizualization"
      ],
      "topics": [
        "make.appearance.matrix"
      ]
    },
    {
      "page": "make.count.table",
      "title": "Count number of times documents have a given phrase.",
      "concept": [
        "textregCounting"
      ],
      "topics": [
        "make.count.table"
      ]
    },
    {
      "page": "make.CV.chart",
      "title": "Plot K-fold cross validation curves",
      "topics": [
        "make.CV.chart"
      ]
    },
    {
      "page": "make.list.table",
      "title": "Collate multiple regression runs.",
      "topics": [
        "make.list.table"
      ]
    },
    {
      "page": "make.path.matrix",
      "title": "Generate matrix describing gradient descent path of textreg.",
      "concept": [
        "plot.path.matrix"
      ],
      "topics": [
        "make.path.matrix"
      ]
    },
    {
      "page": "make.phrase.correlation.chart",
      "title": "Generate visualization of phrase overlap.",
      "concept": [
        "Phrase Vizualization"
      ],
      "topics": [
        "make.phrase.correlation.chart"
      ]
    },
    {
      "page": "make.phrase.matrix",
      "title": "Make a table of where phrases appear in a corpus",
      "concept": [
        "textregCounting"
      ],
      "topics": [
        "make.phrase.matrix"
      ]
    },
    {
      "page": "make.similarity.matrix",
      "title": "Calculate similarity matrix for set of phrases.",
      "concept": [
        "Phrase Vizualization"
      ],
      "topics": [
        "make.similarity.matrix"
      ]
    },
    {
      "page": "path.matrix.chart",
      "title": "Plot optimization path of textreg.",
      "concept": [
        "plot.path.matrix"
      ],
      "topics": [
        "path.matrix.chart"
      ]
    },
    {
      "page": "phrase.count",
      "title": "Count phrase appearance.",
      "concept": [
        "textregCounting"
      ],
      "topics": [
        "phrase.count"
      ]
    },
    {
      "page": "phrase.matrix",
      "title": "Make matrix of where phrases appear in corpus.",
      "topics": [
        "phrase.matrix"
      ]
    },
    {
      "page": "phrases",
      "title": "Get the phrases from the textreg.result object?",
      "concept": [
        "textreg.result"
      ],
      "topics": [
        "phrases"
      ]
    },
    {
      "page": "plot.textreg.result",
      "title": "Plot the sequence of features as they are introduced with the textreg gradient descent program.",
      "concept": [
        "plot.path.matrix"
      ],
      "topics": [
        "plot.textreg.result"
      ]
    },
    {
      "page": "predict.textreg.result",
      "title": "Predict labeling with the selected phrases.",
      "topics": [
        "predict.textreg.result"
      ]
    },
    {
      "page": "print.fragment.sample",
      "title": "Pretty print results of phrase sampling object.",
      "concept": [
        "sample.fragments"
      ],
      "topics": [
        "print.fragment.sample"
      ]
    },
    {
      "page": "print.textreg.corpus",
      "title": "Pretty print textreg corpus object",
      "concept": [
        "textreg.corpus"
      ],
      "topics": [
        "print.textreg.corpus"
      ]
    },
    {
      "page": "print.textreg.result",
      "title": "Pretty print results of textreg regression.",
      "concept": [
        "textreg.result"
      ],
      "topics": [
        "print.textreg.result"
      ]
    },
    {
      "page": "refit.model",
      "title": "Refit the labels to the selected phrases to get non-shrunk predictions. (Uses logistic fit rather than linear, as well.)",
      "topics": [
        "refit.model"
      ]
    },
    {
      "page": "reformat.textreg.model",
      "title": "Clean up output from textreg.",
      "concept": [
        "textreg.result"
      ],
      "topics": [
        "reformat.textreg.model"
      ]
    },
    {
      "page": "sample.fragments",
      "title": "Sample fragments of text to contextualize a phrase.",
      "concept": [
        "sample.fragments"
      ],
      "topics": [
        "sample.fragments"
      ]
    },
    {
      "page": "save.corpus.to.files",
      "title": "Save corpus to text (and RData) file.",
      "topics": [
        "save.corpus.to.files"
      ]
    },
    {
      "page": "stem.corpus",
      "title": "Step corpus with annotation.",
      "topics": [
        "stem.corpus"
      ]
    },
    {
      "page": "testCorpora",
      "title": "Some small, fake test corpora.",
      "topics": [
        "testCorpora"
      ]
    },
    {
      "page": "textreg",
      "title": "Sparse regression of labeling vector onto all phrases in a corpus.",
      "topics": [
        "textreg"
      ]
    },
    {
      "page": "tm_gregexpr",
      "title": "Call gregexpr on the content of a tm Corpus.",
      "topics": [
        "tm_gregexpr"
      ]
    }
  ],
  "_readme": "https://github.com/cran/textreg/raw/HEAD/README.md",
  "_rundeps": [
    "BH",
    "cli",
    "NLP",
    "Rcpp",
    "rlang",
    "slam",
    "tm",
    "xml2"
  ],
  "_sysdeps": [
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "16-20260322-1ubuntu1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "bathtub_vignette.Rmd",
      "filename": "bathtub_vignette.html",
      "title": "Using the textreg package",
      "author": "Miratrix",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Installing the textreg package",
        "Getting ready to regress",
        "Obtaining the Summary",
        "Tuning the Summary",
        "Selecting C",
        "Dropping documents",
        "Exploring the Text",
        "Finding Where Phrases Appear",
        "Independent Search Methods",
        "Finding Phrases' Contexts",
        "Relationships between phrases",
        "Prediction",
        "Out of Sample Prediction",
        "Cross Validation",
        "Cleaning Text and Stemming"
      ],
      "created": "2018-10-04 10:00:03",
      "modified": "2018-10-04 10:00:03",
      "commits": 1
    }
  ],
  "_score": 3.6020599913279625,
  "_indexed": true,
  "_nocasepkg": "textreg",
  "_universes": [
    "cran"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.6",
      "date": "2026-10-17T06:02:02.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/855f693339d9c8ae6ffed7db4b0f3cc700e0a5d150fe8de7a8cc81ba921f0855",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.6",
      "date": "2026-10-17T06:01:35.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/2ee5e2a7653c5aff3b3125b6125fbbddffdbd84732cae5695dae194c60b28907",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.6",
      "date": "2026-10-17T06:02:08.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/4911a67437cf4823891e6923635362151fd465a4dc902444d8801647cbf17ed8",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.6",
      "date": "2026-10-17T06:01:33.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/fd4a59305c58dae60d8d964776614e0520dbbeeb612af21062417d7326e8f214",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.6",
      "date": "2026-10-17T06:02:27.000Z",
      "arch": "emscripten",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/ab2f20b3f18540ca5b3efbd99a6fdf14a654693cb5a1671df76ca4f04c388a77",
      "status": "success",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.6",
      "date": "2026-10-17T06:03:18.000Z",
      "arch": "aarch64",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/fb9d73bacb31e6cd1487f0ca04152106ce9f00706dd0f2bffcdd2a7d6790983f",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.6",
      "date": "2026-10-17T06:00:44.000Z",
      "arch": "x86_64",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/8bbbece61be8d738cbc6d78b3aa921ab6a2228404510c7d0999a36d692ffc2f2",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.6",
      "date": "2026-10-17T06:03:19.000Z",
      "arch": "aarch64",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/52b8f0bd11fed7e69e37382a5e4e498796dbba81e5aa5ca3996f7e66c3da14ed",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.6",
      "date": "2026-10-17T06:00:52.000Z",
      "arch": "x86_64",
      "commit": "0caf4f12cd4128fd906535cba393b74a48c4230f",
      "fileid": "https://r2.ropensci.org/cc3bfd3e95324e81a5fb781b50e5fb37cdcb652d7aee257d0336d69107239fab",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/39008055646"
    }
  ]
}