避免在测验应用程序中重复不同类别的问题

时间:2015-07-13 01:12:16

标签: ios iphone

在这个测验应用中,我想避免重复问题。共有十个类别,每个类别有17个问题。我试图使用一个存储所选问题编号的数组。

如何让library(gsubfn) examples <- c( "* Bullet 1\n* Bullet 2\n* Bullet 3", "1. Bullet 1\n2. Bullet 2\n3. Bullet 3", "* This is a test 1\n* This is a test with some *formatting*\n* This is a test with different _formatting_" ) strapply(examples, '(?:\\*|\\d+\\.) *([^\n]+)', c, simplify = c) # [1] "Bullet 1" # [2] "Bullet 2" # [3] "Bullet 3" # [4] "Bullet 1" # [5] "Bullet 2" # [6] "Bullet 3" # [7] "This is a test 1" # [8] "This is a test with some *formatting*" # [9] "This is a test with different _formatting_" 成为先前未存储在数组中的数字?现在它不起作用..

QuestionSelected

0 个答案:

没有答案