Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Minimal example LinkingTo the stringdist C api

NotificationsYou must be signed in to change notification settings

markvanderloo/linkstringdist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal example of anR package LinkingTo thestringdistC api.

Installation

You don't really need to install this package since you're not going touse it for anything. The code can be obtained by cloning this repository.

git clone https://github.com/markvanderloo/linkstringdist

Notes.

This package uses a function from thestringdistC API, which is calledfrom pureC code. A more interesting andC++ based example can be found intherefinr package.

A full API description can be found by typing

?stringdist::stringdist_api

in theR console.

Don't forget to set@useDynLib via Roxygen documentation. Alternatively setuseDynLib() manually in theNAMESPACE file.

Addingstringdist to theImports fied of theDESCRIPTION file is notenough. You also need to add an@import stringdist Roxygen field or animport(stringdist) entry manually in theNAMESPACE file to ensure thatstringdist is loaded and the shared object files are available. Alternativelyan@ImportFrom or theNAMESPACE equivalent will work as well.

This package also registers its singleC routine for export. This is onlynecessary to avoid aNOTE when preparing a package for CRAN. I.E. the noteonly pops up when checking the package with the--as-cran flag. So it is notnecessary to add a file likeR_RegisterNativeRoutines.c for localpackages.

Code for this package was developed usingVIM.

About

Minimal example LinkingTo the stringdist C api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp