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 Sept. 30, 2024, 9:43 a.m.