Nothing
Code
new_external_class(1, "x")
Condition
Error in `new_external_class()`:
! `package` must be a string.
Code
new_external_class("pkg", 1)
Condition
Error in `new_external_class()`:
! `name` must be a string.
Code
print(new_external_class("foo", "Bar"))
Output
<S7_external_class> foo::Bar
Code
print(new_external_class("foo", "Bar", version = "1.0"))
Output
<S7_external_class> foo::Bar (>= 1.0)
Code
resolve_external_class_req(new_external_class("not_a_pkg", "X"))
Condition
Error:
! Can't find external class <not_a_pkg::X>:
* Package 'not_a_pkg' is not installed.
Code
resolve_external_class_req(new_external_class("too.old", "X", "2.0.0"))
Condition
Error:
! Can't find external class <too.old::X>:
* Package 'too.old' needs version 2.0.0, but only 1.0.0 is available.
Code
resolve_external_class_req(new_external_class("too.old", "X"))
Condition
Error:
! Package 'too.old' must export `X` as an S7 class.
Code
Tree(label = "bad", child = 1)
Condition
Error in `Tree()`:
! <mypkg::Tree> object properties are invalid:
- @child must be <NULL> or <mypkg::Tree>, not <double>
Code
Holder(child = invalid)
Condition
Error in `Holder()`:
! <S7::Holder> object properties are invalid:
- @child: x must be non-negative
Code
new_class(name = "Dog", parent = Animal)
Condition
Error:
! Can't find external class <dep::Animal>:
* Package 'dep' needs version 2.0.0, but only 1.0.0 is available.
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.