You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are I think several issues with this function.
First, the description on how the function is supposed to be used needs some attention.
What is stated clearly in the help for the function is, however, that if you want to insert an ITEM/SEGMENT/EVENT onto a level with multiple attribute definitions, then you need to specify a label for each attribute. If I try, however, I get these errors:
> rlang::last_error()
<error/tibble_error_incompatible_size>
Tibble columns must have compatible sizes.
* Size 0: Existing data.
* Size 3: Column `attribute`.
ℹ Only values of size one are recycled.
Backtrace:
[.... my function's calls removed to avoid confusion...]
8. dplyr::tibble(...)
9. tibble:::tibble_quos(xs, .rows, .name_repair)
10. tibble:::vectbl_recycle_rows(res, first_size, j, given_col_names[[j]])
If I have multiple attributes defined for a level I cannot insert them individually, so there seem to be checks in place Error: Error in item 0000:msajc003:Intsint:1. The provided attributes (Intsint) do not match the attributes required (Intsint, Momel, IntsintMomel) for the level (Intsint).
indicating that the case of multiple attributes has been considered also in the code. Inserting labels into a level with just a single attribute defined works fine.
Looking at the code I also see checks that I think make little sense:
stop("'itemsToCreate' contains multiple attributes! The created ITEMs have to be on the same attribute!")
}
I dont see why the function should check if the number of levels is> 0 again here. It is not just a simple error of variable checked since the number of unique attributes should actually be more than one if required by the attribute definition.
The text was updated successfully, but these errors were encountered:
There are I think several issues with this function.
First, the description on how the function is supposed to be used needs some attention.
What is stated clearly in the help for the function is, however, that if you want to insert an ITEM/SEGMENT/EVENT onto a level with multiple attribute definitions, then you need to specify a label for each attribute. If I try, however, I get these errors:
If I have multiple attributes defined for a level I cannot insert them individually, so there seem to be checks in place
Error: Error in item 0000:msajc003:Intsint:1. The provided attributes (Intsint) do not match the attributes required (Intsint, Momel, IntsintMomel) for the level (Intsint).
indicating that the case of multiple attributes has been considered also in the code. Inserting labels into a level with just a single attribute defined works fine.
Looking at the code I also see checks that I think make little sense:
emuR/R/emuR-annotations_crud.R
Lines 78 to 81 in e1c0bc1
I dont see why the function should check if the number of levels is> 0 again here. It is not just a simple error of variable checked since the number of unique attributes should actually be more than one if required by the attribute definition.
The text was updated successfully, but these errors were encountered: