Skip to content

add_variables() can't create several variables at once #73

@TanguyBarthelemy

Description

@TanguyBarthelemy

The function add_variables() can't create more than one variable at a time. Should it be renamed add_variable() then?

Here is a small example:

library("rjd3workspace")
my_ws <- jws_new()

add_variables(
    jws = my_ws, 
    group = "reg1", 
    y = list(a = mdeaths, b = ldeaths),
    name = "DeathMale"
)

Error in .jcall("jdplus/toolkit/base/r/timeseries/TsUtility", "Ljdplus/toolkit/base/api/timeseries/TsData;", : 'list' object cannot be coerced to type 'double'

my_ws <- jws_new()

add_variables(
    jws = my_ws, 
    group = "reg1", 
    y = cbind(mdeaths, ldeaths), 
    name = c("DeathMale", "other_deaths")
)

Error in .jcall(jws, "V", "addVariable", group, name, rjd3toolkit::.r2jd_tsdata(y)): method addVariable with signature (Ljava/lang/String;[Ljava/lang/String;Ljdplus/toolkit/base/api/timeseries/TsData;)V not found

or have I missed something?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions