aim-rsf / browseMetadata

An R package to help a researcher browse metadata for health datasets and categorise variables based on research domains
https://aim-rsf.github.io/browseMetadata/
GNU General Public License v3.0
3 stars 1 forks source link

Restrict input to readline(prompt = "") #71

Closed RayStick closed 3 months ago

RayStick commented 6 months ago

Using readline(prompt = "Question? ") does not allow for specificity of what data type is given (e.g. text, single integer, comma seperated text or integers) as it reads everything in as a string.

At multiple points in the code the user is asked for a certain input but if they gave a different type, it would not always notice this is an invalid input. More validation checks on the input the user gives to every readline(prompt) is needed to avoid the code crashing and giving the user non-specific error message

Rainiefantasy commented 5 months ago

I think this captures what I mentioned in PR #67 I've assigned this to both of us for now and we can always decide who does what later :)

RayStick commented 4 months ago

This looks like a helpful article: https://www.scaler.com/topics/user-input-in-r/