IPS-LMU / emuR

The main R package for the EMU Speech Database Management System (EMU-SDMS)
http://ips-lmu.github.io/EMU.html
23 stars 15 forks source link

emuR::get_trackdata() : redundant option ssffTrackName when on-the-fly #56

Closed florianschiel closed 9 years ago

florianschiel commented 9 years ago

emuR::get_trackdata() requires the option ssffTrackName, even when option onTheFlyFunctionName is used

This does not make any sense, since the data are not read from a SSFF file. Furthermore, the user has to 'guess' the correct string to put here (e.g. for the onTheFlyFunctionName 'zcrana' it has to be 'zcr'), otherwise the function issues the following error message that does not make any sense here (not even if you understand German ;-):

Fehler in matrix(ncol = ncol(tmpData), nrow = nrOfAllocationRows) : nicht numerische Matrix-Ausdehnung

raphywink commented 9 years ago

For most functions it would be possible to "guess" the right column name that the user wishes as most ASSP functions return an AsspDataObj that only contains a single column (ksvF0, zcrana,...). Unfortunately some functions (e.g. forest) return multiple columns (fm=formant values and bw=their bandwidths). I don't think it would be a good idea to hardcode the columns that are returned as it could well be possible that some people want to get something else. What you can do if you are sick of guessing is accessing the tracks of the wrasspOutputInfos:

get_trackdata(..., onTheFlyFunctionName = 'forest', ssffTrackName = wrasspOutputInfos$forest$tracks[1])
florianschiel commented 9 years ago

I see your point. As a compromise for users I would suggest that the help page of get_trackdata then lists the possible string values of this option and that the error message is mended.

raphywink commented 9 years ago

What we could do is to say that if the ssffTrackName is left empty per default the first entry in wrasspOutputInfos[[onTheFlyFunctionName]]$tracks is chosen.

raphywink commented 9 years ago

Just improved the docs for get_trackdata a bit and added the feature that if ssffTrackName is not set but onTheFlyFunctionName is then the first track listed in wrasspOutputInfos[[onTheFlyFunctionName]]$tracks is chosen.