context ("object")

test_that ("object creation", {
    skip_if_not (is.net.installed(), "rDotNet built without .NET CLR server build")

    obj <- .cnew ("DateTime", 2017, 4, 1)
    year <- obj$Get("Year")    
    month <- obj$Get("Month")
    expect_equal(2017, year)
    expect_equal(4, month)

    ntime <- obj$AddMonths (2)
    month <- ntime$Get("Month")
    expect_equal(6, month)

Try the rDotNet package in your browser

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

rDotNet documentation built on May 2, 2019, 8:19 a.m.