【问题标题】:true-false questions in exams R package考试 R 包中的真假问题
【发布时间】:2020-08-08 16:15:30
【问题描述】:

我正在尝试在考试 R 包中构建一个真假问题。这是一个单选练习,答案列表中只有两个可能的答案。代码如下:

Question
========
¿Puede una variable clasificarse como cualitativa continua?

Answerlist
----------
* Si
* No

Solution
========
No es posible ya que una variable continua debe ser nesezariamente una variable cuantitativa.

Answerlist
----------
* False
* True

Meta-information
================
exname: Escalas de medicion 01
extype: schoice
exsolution: 01
exshuffle: 2

运行exams2html(question.Rmd) 后,输出有三个可能的答案,包括NA

我做错了什么?

会话信息:

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=es_CO.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=es_CO.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=es_CO.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_CO.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.0   stringr_1.4.0   dplyr_1.0.0     purrr_0.3.4    
 [5] readr_1.3.1     tidyr_1.1.0     tibble_3.0.3    ggplot2_3.3.2  
 [9] tidyverse_1.3.0 exams_2.3-6     pacman_0.5.1   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5       cellranger_1.1.0 pillar_1.4.6     compiler_4.0.2  
 [5] dbplyr_1.4.4     tools_4.0.2      jsonlite_1.7.0   lubridate_1.7.9 
 [9] lifecycle_0.2.0  gtable_0.3.0     pkgconfig_2.0.3  rlang_0.4.7     
[13] reprex_0.3.0     cli_2.0.2        rstudioapi_0.11  DBI_1.1.0       
[17] haven_2.3.1      withr_2.2.0      xml2_1.3.2       httr_1.4.2      
[21] fs_1.4.2         generics_0.0.2   vctrs_0.3.2      hms_0.5.3       
[25] grid_4.0.2       tidyselect_1.1.0 glue_1.4.1       R6_2.4.1        
[29] fansi_0.4.1      readxl_1.3.1     modelr_0.1.8     blob_1.2.1      
[33] magrittr_1.5     backports_1.1.8  scales_1.1.1     ellipsis_0.3.1  
[37] rvest_0.3.5      assertthat_0.2.1 colorspace_1.4-1 stringi_1.4.6   
[41] munsell_0.5.0    broom_0.7.0      crayon_1.3.4    

【问题讨论】:

  • 我无法复制这个。对我来说 exshuffle: TRUEexshuffle: 2 都可以正常工作。这是哪个版本的exams?我尝试了开发版、CRAN 版和 2.3-0 版(从 2017 年开始),所有这些都导致了所需的输出。除了您在此处发布的question.Rmd,也许您还有另一个question.Rmd
  • 我用我的会话信息更新了帖子。版本是exams_2.3-6
  • 感谢您,我现在检测并修复了该错误。看我的回答。

标签: r-exams


【解决方案1】:

通过设置修复了问题

exshuffle: TRUE

【讨论】:

    【解决方案2】:

    这是exams 包中的一个错误,仅在某些情况下才会出现。它已在包的 2.4-0 版本(当前开发版本)中得到修复。您可以通过以下方式安装它:

    install.packages("exams", repos = "http://R-Forge.R-project.org")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-03-08
      • 1970-01-01
      • 2019-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-09
      相关资源
      最近更新 更多