Nothing
Code
track <- setClass("track", slots = c(x = "numeric", y = "numeric"))
construct(track)
Output
setClass(
"track" |>
structure(package = "constructive"),
slots = c(x = "numeric", y = "numeric")
)
Code
t1 <- track(x = 1:3, y = 4:6)
construct(t1)
Output
new(
"track" |>
structure(package = "constructive"),
x = 1:3,
y = 4:6
)
Code
trackCurve <- setClass("trackCurve", slots = c(smooth = "numeric"), contains = "track")
construct(trackCurve)
Output
setClass(
"trackCurve" |>
structure(package = "constructive"),
slots = c(smooth = "numeric", x = "numeric", y = "numeric")
)
Code
t1s <- trackCurve(t1, smooth = 1:3)
construct(t1s)
Output
new(
"trackCurve" |>
structure(package = "constructive"),
smooth = 1:3,
x = 1:3,
y = 4:6
)
Code
construct(prototype(1, a = 2))
Output
prototype(1, a = 2)
Code
construct(getClass("numeric"))
Output
getClassDef("numeric", package = "methods")
Code
track0 <- track
attr(track0, "class") <- NULL
construct(track0)
Message
{constructive} couldn't create code that reproduces perfectly the input
i Call `construct_issues()` to inspect the last issues
Output
as.function(
list(
... = quote(expr = ),
as.call(list(
quote(new),
"track" |>
structure(package = "constructive"),
quote(...)
))
),
envir = asNamespace("constructive")
) |>
structure(
className = "track" |>
structure(package = "constructive"),
package = "constructive"
) |>
asS4()
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.