| CARVIEW |
Select Language
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Tue, 31 Oct 2023 10:37:00 GMT
access-control-allow-origin: *
etag: W/"6540d8cc-1fa6e"
expires: Sun, 18 Jan 2026 04:16:53 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 628F:377A50:18B287:1D442D:696C5C5C
accept-ranges: bytes
age: 0
date: Sun, 18 Jan 2026 04:06:53 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210095-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1768709213.210585,VS0,VE230
vary: Accept-Encoding
x-fastly-request-id: 6c9d7f4c1449a4691eb87dd38c36c06dc3289379
content-length: 13354
CART
Since visNetwork_2.0.0, you can visualize Classification and Regression Trees from the output of the rpart package, simply using
Since visNetwork_2.0.0, you can visualize Classification and Regression Trees from the output of the rpart package, simply using visTree :
Classification Tree
library(rpart)
# Basic classification tree
res <- rpart(Species~., data=iris)
visTree(res, main = "Iris classification Tree", width = "100%")
Regression tree
res <- rpart(Petal.Length~., data=iris)
visTree(res, edgesFontSize = 14, nodesFontSize = 16, width = "100%")
data("solder")
res <- rpart(Opening~., data = solder, control = rpart.control(cp = 0.00005))
visTree(res, height = "800px", nodesPopSize = TRUE, minNodeSize = 10,
maxNodeSize = 30, width = "100%")
Use in shiny
Have a look at visTreeEditor to edit and get back to the network, and at visTreeModuleServer to use custom tree module in R.