tests/testthat/test_asR.R

context("asR test")

test_that("test of the asR functions", {
    skip_on_cran()
    julia <- julia_setup(installJulia = TRUE)

    expect_equal(as.double(julia_eval("1//2")), 0.5)
    expect_equal(as.double(julia_eval("[1//2, 3//4]")), c(0.5, 0.75))
})

Try the JuliaCall package in your browser

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

JuliaCall documentation built on Sept. 8, 2022, 5:10 p.m.