Closed FredrikKarlssonSpeech closed 5 years ago
The title did not say much.
This is fixed in version 2.0.2 that I released yesterday! The default resultType is now tibble with the following columns:
names(sl)
[1] "labels" "start" "end" "db_uuid" "session"
[6] "bundle" "start_item_id" "end_item_id" "level" "attribute"
[11] "start_item_seq_idx" "end_item_seq_idx" "type" "sample_start" "sample_end"
[16] "sample_rate"
"level" and "attribute" are sep. cols now and you are correct that "level" used to be misleading!
Fantastic! This makes it very clear what data structure should be focused on going forward.
Hi,
I would like to suggest two small revisions to emuRsegs that I think would make it easier to work with the class going forward.
First, I think the 'level' column of the data structure is not accurately named. It should really be attribute, as that is what we are querying. I demonstrate this using the ae database:
This is a breaking change, but I think it is necessary to correct it in order to make the system easier for users and developers wanting to help out. And, the name of the column is actually wrong.
The second suggestion is smaller, but I think helpful. Since the level that has a given attribute is known at query time, I would like the level to be stored as an attribute of the emuRsegs object when it is created. Like "query","type" and "database" is now. This would allow restructuring https://github.com/IPS-LMU/emuR/blob/151c03b801cadf7b19fbde120788090ac60c6500/R/emuR-create_seglists.R#L2 to a 'as_tibble.emuRsegs' that I think would be helpful to have going forward.