1

我正在尝试在考试 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    
4

2 回答 2

1

通过设置修复了该问题

exshuffle: TRUE
于 2020-08-05T14:50:34.500 回答
0

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

install.packages("exams", repos = "http://R-Forge.R-project.org")
于 2020-08-08T08:15:30.947 回答