tests/testthat/test_0_install_test.R

library(testthat)
library(text)

test_that("installing text", {
  skip_on_cran()

  textrpp_install(prompt = FALSE)

  textrpp_initialize(textEmbed_test = FALSE)

  text_test <- textEmbed("hello")

  expect_equal(text_test$tokens$texts[[1]]$Dim1[[1]], -0.9554495, tolerance = 0.0001)
})

Try the text package in your browser

Any scripts or data that you put into this service are public.

text documentation built on Aug. 9, 2023, 5:08 p.m.