我正在 R 中构建用户输入界面。
在加载程序时,我想根据一组 6 个字段询问用户他们的偏好是什么。然后,这将用作程序其余部分的比较工具。
例如,
>ThisProgram
>"Hello, on a scale of 1 to 10, how much would you say you rate the outdoors in your trips? Enter a 10 for very important, and a 1 for not important at all.
>7
>"Great. on a scale of 1 to 10, how much would you say you rate the Family Friendly in your trips? Enter a 10 for very important, and a 1 for not important at all.
>2
.
.
.
and so on...
我如何让 R 向用户提出问题,然后将响应存储在向量中?