inst/unittests/test.factors.r

.setUp <- function() {}
.tearDown <- function() {}

test.factors <- function()
{
	x <- as.factor(c("abc", "abc", "dog", "abc"))
	json <- toJSON( x )
	checkIdentical( json, "[\"abc\",\"abc\",\"dog\",\"abc\"]" )
}

Try the rjson package in your browser

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

rjson documentation built on Jan. 9, 2022, 9:07 a.m.