#!/usr/bin/Rscript
# -*- coding: utf-8 -*-
################################ Description ###################################
# Title: Test unit for close_names
# Created the 2014-12-31
# by Joris Muller <joris.muller@jom.link>
# Licence: GPLv3 <http://www.gnu.org/licenses/>
################################################################################
library(testthat)
library(stringdist)
char1 <- c("house", "House", "houses", "tree")
test_that("Find close strings", {
r <- find_close_strings(char1)
expect_is(r, "list")
expect_equal(r[[1]], c("House", "houses"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.