Nothing
test_that("test add_attributes function follows the xml path properly", {
model0 <- lm(Sepal.Length ~ ., data = iris[, -5])
model <- pmml(model0)
# add arbitary attributes on the 3rd 'NumericPredictor' element
# with an attribute 'exponent'=1
model <- add_attributes(model,
"/p:PMML/descendant::p:NumericPredictor[@exponent='1'][3]",
attributes = c(a = 1, b = "b")
)
test <- xmlToList(model)$RegressionModel$RegressionTable[[3]]
expect_equal(test[[1]], "Petal.Width")
expect_equal(test[[4]], "1")
expect_equal(names(test)[4], "a")
expect_equal(test[[5]], "b")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.