Supported types for RS classes include:
t_anyt_date,t_datest_int,t_intst_dbl,t_dblst_num,t_numst_char,t_charst_bool,t_boolst_cplx,t_cplxst_raw,t_rawst_factor,t_factorst_listt_arrayt_vectort_matrixt_dataframet_hashtabt_environmentt_pairlistt_funct_exprt_callt_symt_langt_objt_prim
Note that there are scalar and vector versions of some types,
such as t_int and t_ints.
The former allows for a single scalar integer,
while the latter matches a vector of integers.
There is also the catch-all type t_any,
which will match any value, and is useful for cases where
you want to allow any type of value for a field,
while still validating the other fields,
i.e. when .validation = TRUE (the default).
Usage
t_any()
t_date()
t_dates()
t_int()
t_ints()
t_dbl()
t_dbls()
t_num()
t_nums()
t_char()
t_chars()
t_bool()
t_bools()
t_cplx()
t_cplxs()
t_raw()
t_raws()
t_factor()
t_factors()
t_list()
t_array()
t_vector()
t_matrix()
t_dataframe()
t_hashtab()
t_environment()
t_pairlist()
t_func()
t_expr()
t_call()
t_sym()
t_lang()
t_obj()
t_prim()Examples
t_any
#> function ()
#> .Call(wrap__ClassType__from_str, name, PACKAGE = "RS")
#> <bytecode: 0x5611c0cc2900>
#> <environment: 0x5611c0cbdb00>
#> attr(,"class")
#> [1] "TypeGenerator" "function" "RS"
t_date
#> function ()
#> .Call(wrap__ClassType__from_str, name, PACKAGE = "RS")
#> <bytecode: 0x5611c0cfbf00>
#> <environment: 0x5611c0cfce50>
#> attr(,"class")
#> [1] "TypeGenerator" "function" "RS"
t_ints
#> function ()
#> .Call(wrap__ClassType__from_str, name, PACKAGE = "RS")
#> <bytecode: 0x5611c0d2d480>
#> <environment: 0x5611c0d28680>
#> attr(,"class")
#> [1] "TypeGenerator" "function" "RS"
t_dataframe
#> function ()
#> .Call(wrap__ClassType__from_str, name, PACKAGE = "RS")
#> <bytecode: 0x5611c0d5e5d8>
#> <environment: 0x5611c0d5b6f8>
#> attr(,"class")
#> [1] "TypeGenerator" "function" "RS"