Skip to content

kgrams

Classical k-gram Language Models

v0.2.1 · Nov 13, 2024 · GPL (>= 3)

Description

Training and evaluating k-gram language models in R, supporting several probability smoothing techniques, perplexity computations, random text generation and more.

Downloads

CRAN

645

Last 30 days

5282nd

2K

Last 90 days

8.2K

Last year

Trend: +0.2% (30d vs prior 30d)

r2u CRAN

24

Last 30 days

115

Last 90 days

430

Last year

Trend: -40% (30d vs prior 30d)

autoCRAN

2

Last 7 days

9

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

2 NOTE
11 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang NOTE
r-devel-linux-x86_64-fedora-gcc NOTE
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (2 non-OK)
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.

Check History

NOTE 10 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 22, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 18.3Mb
  sub-directories of 1Mb or more:
    libs  17.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 17.6Mb
  sub-directories of 1Mb or more:
    libs  17.2Mb
ERROR 9 OK · 4 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 18, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
ERROR r-devel-windows-x86_64

whether package can be installed

Installation failed.
See 'd:/Rcompile/CRANpkg/local/4.6/kgrams.Rcheck/00install.out' for details.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 18.3Mb
  sub-directories of 1Mb or more:
    libs  17.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 17.6Mb
  sub-directories of 1Mb or more:
    libs  17.2Mb
NOTE 7 OK · 7 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 10, 2026
NOTE r-devel-linux-x86_64-debian-clang

compiled code

File ‘kgrams/libs/kgrams.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-devel-windows-x86_64

compiled code

File 'kgrams/libs/x64/kgrams.dll':
  Found non-API call to R: 'R_UnboundValue'

Compiled code should not call non-API entry points in R.

See 'Writing portable packages' in the 'Writing R Extensions' manual,
and section 'Moving into C API compliance' for issues with the use of
non-API entry points.
NOTE r-patched-linux-x86_64

compiled code

File ‘kgrams/libs/kgrams.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 18.3Mb
  sub-directories of 1Mb or more:
    libs  17.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 17.6Mb
  sub-directories of 1Mb or more:
    libs  17.2Mb
ERROR 6 OK · 7 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 9, 2026
NOTE r-devel-linux-x86_64-debian-clang

compiled code

File ‘kgrams/libs/kgrams.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
ERROR r-devel-linux-x86_64-debian-gcc

whether package can be installed

Installation failed.
See ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/kgrams.Rcheck/00install.out’ for details.
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-devel-windows-x86_64

compiled code

File 'kgrams/libs/x64/kgrams.dll':
  Found non-API call to R: 'R_UnboundValue'

Compiled code should not call non-API entry points in R.

See 'Writing portable packages' in the 'Writing R Extensions' manual,
and section 'Moving into C API compliance' for issues with the use of
non-API entry points.
NOTE r-patched-linux-x86_64

compiled code

File ‘kgrams/libs/kgrams.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 18.3Mb
  sub-directories of 1Mb or more:
    libs  17.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 17.6Mb
  sub-directories of 1Mb or more:
    libs  17.2Mb
NOTE 10 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘RcppProgress’
  All declared Imports should be used.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 18.3Mb
  sub-directories of 1Mb or more:
    libs  17.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 17.6Mb
  sub-directories of 1Mb or more:
    libs  17.2Mb

Code

Structure

Lines of code

7,240

Files

91

Compiled share

31.7%

Has compiled src

Yes

Language breakdown

R 2,148 (29.7%)C/C++/src 2,293 (31.7%)Tests 1,161 (16%)Docs 1,309 (18.1%)Vignettes 329 (4.5%)

API

Exported functions

21

Internal functions

67

Recent export changes

v0.1.0+21 %+%, %|%, param<- +18 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.54

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

90.5%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

0%

Unsafe pattern score

0

Dep constraint coverage

16.7%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.0

System requirements

C++ standard

License

GPL (>= 3)

License flags

SPDX valid, OSI approved

History

Versions

5

First release

2021-02-15

Latest release

2024-11-13

Avg cadence

339 days

Cold removal rate

Dep drift

0

LOC over versions

v0.1.0: 6,167 LOCv0.1.2: 7,087 LOCv0.1.5: 7,031 LOCv0.2.0: 7,240 LOCv0.2.1: 7,240 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies Rcpp rlang RcppProgress Rdpack idiolect kgrams

Version History

6 tracked
new 0.2.1 Mar 10, 2026
updated 0.2.1 ← 0.2.0 diff Nov 12, 2024
updated 0.2.0 ← 0.1.5 diff Oct 5, 2023
updated 0.1.5 ← 0.1.2 diff Apr 17, 2023
updated 0.1.2 ← 0.1.0 diff Nov 15, 2021
new 0.1.0 Feb 14, 2021