Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in nysiis.R #45

Open
wants to merge 35 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c9a5392
Merge branch 'hotfix/1.2.1'
howardjp Jan 2, 2019
8ddc93d
Merge branch 'release/v1.2.2'
howardjp Jan 7, 2019
ef5779b
Merge branch 'release/v1.2.3'
howardjp Jan 9, 2019
702c69c
Merge branch 'release/1.3.0'
howardjp Mar 1, 2019
da2fed8
Merge branch 'release/v1.3.1'
howardjp Jun 18, 2019
05b9809
Merge branch 'release/v1.3.2'
howardjp Jun 18, 2019
06df528
Remove docs
howardjp Jul 5, 2020
5ed13db
Merge branch 'release/v1.3.3'
howardjp Jul 5, 2020
13c1286
Merge branch 'release/v1,3.4'
howardjp Jul 5, 2020
47fe0c5
Merge branch 'release/v1.3.5'
howardjp Jul 5, 2020
1c746f0
Merge branch 'release/v1.3.6'
howardjp Jul 6, 2020
28f1148
Merge branch 'release/v1.3.7' into master
howardjp Oct 1, 2020
d95d754
Merge branch 'release/v1.3.8' into master
howardjp Oct 1, 2020
25e9f75
Merge branch 'release/v1.3.9' into master
howardjp Oct 12, 2020
db4ecbc
update main
howardjp Jul 10, 2021
569605b
Added some new work flows
howardjp Jul 10, 2021
5e111b4
Added develop to workflows
howardjp Jul 10, 2021
f87423d
Added the matrix test
howardjp Jul 11, 2021
ea7fefa
Fix the R version/matrix issue
howardjp Jul 11, 2021
6693c38
Added test-coverage
howardjp Jul 11, 2021
0308160
Travis made the switch too hard
howardjp Jul 11, 2021
1a09cfc
Remove checking suggests
howardjp Jul 11, 2021
4f92119
Re-enable Ubuntu builds
howardjp Jul 11, 2021
608d445
Removed windows dev
howardjp Jul 11, 2021
be51433
Why? Why must life be so hard? Why must I fail in every attempt at ma…
howardjp Jul 11, 2021
f694871
Use default package manager for R on Ubuntu
howardjp Jul 11, 2021
a9221d1
Removing Ubuntu
howardjp Jul 11, 2021
ff361a2
Added GitHub Actions-based build check badge
howardjp Jul 11, 2021
f19d912
Add usethis
howardjp Jul 11, 2021
1825c99
Merge branch 'develop' of github.com:k3jph/phonics-in-r into develop
howardjp Jul 11, 2021
c6ed47f
Update check-release.yaml
howardjp Jul 11, 2021
1c540bc
Add pandoc to test build
howardjp Jul 11, 2021
ba78cb8
Bump version and date
howardjp Jul 11, 2021
062eec5
Merge branch 'release/v1.3.10'
howardjp Jul 11, 2021
d727a43
Fix typo in nysiis.R
kinow Jun 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/check-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- master
- develop
pull_request:
branches:
- main
- master
- develop

name: Build

jobs:
Build:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v1

- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck", "usethis"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
devtools::document()
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check


51 changes: 51 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
branches:
- main
- master
- develop
pull_request:
branches:
- main
- master
- develop

name: lint

jobs:
lint:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("lintr")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
88 changes: 0 additions & 88 deletions .github/workflows/r.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
push:
branches:
- main
- master
- develop
pull_request:
branches:
- main
- master
- develop

name: test-coverage

jobs:
test-coverage:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1

- uses: r-lib/actions/setup-pandoc@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: phonics
Type: Package
Title: Phonetic Spelling Algorithms
Version: 1.3.9
Date: 2020-10-12
Version: 1.3.10
Date: 2021-7-11
Encoding: UTF-8
Authors@R: c(person(given = "James", family = "Howard",
email = "[email protected]", role = c("aut", "cre"),
Expand Down
20 changes: 20 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# Generated by roxygen2: do not edit by hand

export(caverphone)
export(cologne)
export(lein)
export(metaphone)
export(mra_compare)
export(mra_encode)
export(nysiis)
export(onca)
export(phonex)
export(phonics)
export(refinedSoundex)
export(rogerroot)
export(soundex)
export(statcan)
importFrom(Rcpp,evalCpp)
importFrom(data.table,":=")
importFrom(data.table,data.table)
importFrom(utils,read.csv)
useDynLib(phonics)
2 changes: 1 addition & 1 deletion R/nysiis.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#' @param modified if \code{TRUE}, use the modified NYSIIS algorithm
#' @param clean if \code{TRUE}, return \code{NA} for unknown alphabetical characters
#'
#' @details The \code{nysiis} function phentically encodes the given
#' @details The \code{nysiis} function phonetically encodes the given
#' string using the New York State Identification and Intelligence
#' System (NYSIIS) algorithm. The algorithm is based on the
#' implementation provided by Wikipedia and is implemented in pure R
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

![CRAN/METACRAN](https://img.shields.io/cran/v/phonics)
[![Downloads from the RStudio CRAN mirror](https://cranlogs.r-pkg.org/badges/phonics)](https://cran.r-project.org/package=phonics)
[![Build Status](https://api.travis-ci.org/k3jph/phonics-in-r.svg?branch=master)](https://travis-ci.org/k3jph/phonics-in-r)
[![codecov](https://codecov.io/gh/k3jph/phonics-in-r/branch/master/graph/badge.svg)](https://codecov.io/gh/k3jph/phonics-in-r)
[![Build Status](https://github.com/k3jph/phonics-in-r/actions/workflows/check-release.yaml/badge.svg?branch=main)](https://github.com/k3jph/phonics-in-r/actions/workflows/check-release.yaml)
[![codecov](https://codecov.io/gh/k3jph/phonics-in-r/branch/main/graph/badge.svg)](https://codecov.io/gh/k3jph/phonics-in-r)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/08ad4c6ccb8d4bf59ca47b7524af04be)](https://app.codacy.com/gh/k3jph/phonics-in-r)
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.1041982-success.svg)](https://dx.doi.org/10.5281/zenodo.1041982)
[![JOSS Status](http://joss.theoj.org/papers/13e41c9bd376fe2fc948f8af10b138b6/status.svg)](https://joss.theoj.org/papers/10.21105/joss.00480)
Expand Down
5 changes: 5 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// metaphone_internal
Rcpp::CharacterVector metaphone_internal(Rcpp::CharacterVector word, int maxCodeLen);
RcppExport SEXP _phonics_metaphone_internal(SEXP wordSEXP, SEXP maxCodeLenSEXP) {
Expand Down