View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
13778 | Bug reports | Import/Export | public | 2018-06-14 11:59 | 2019-05-13 14:10 |
Reporter | Plano | Assigned To | |||
Priority | none | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 3.9.x | ||||
Fixed in Version | 3.11.x | ||||
Summary | 13778: Exporting data to the most recent version of R leads to incorrect data | ||||
Description | This problems applies to the matrix questions, where not all options are labelled (e.g. only the extreme anchors got labels, while the middle points don't have any labels.) The generate R-code will collapse all non-labeled options into one option. R handels labels completely different, compared to SPSS. The man page of the factor command https://stat.ethz.ch/R-manual/R-devel/library/base/html/factor.html explains the label option as: labels either an optional character vector of labels for the levels (in the same order as levels after removing those in exclude), or a character string of length 1. Duplicated values in labels can be used to map different values of x to the same factor level. | ||||
Additional Information | As a workaround, I programmed the following R function: factor_lime <- function(x, levels, labels, ...){ | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 3.9.0 (180604) | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MaraDB | ||||
Server OS (if known) | Debian Stretch | ||||
Webserver software & version (if known) | Apache2 | ||||
PHP Version | PHP 7 | ||||
If you have in the data (adding a space for each label) : it fix the issue ? (really time to move R and SPPS to seperate plugin …) |
|
No, this would not fix the problem. As long as there are labels with the same value, R will treat them as equal. One way of fixing it, would be the following code: |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=27434 |
|
@Plano : question about « No, this would not fix the problem. As long as there are labels with the same value, R will treat them as equal. One way of fixing it, would be the following code:» Then we must ALWAYS add the code ? Right ? |
|
Yes this would brake the code too. While I'm not sure how often this problem arrises, adding always the code seems a good idea. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2018-06-14 11:59 | Plano | New Issue | |
2018-06-14 11:59 | Plano | File Added: survey_archive_417723.lsa | |
2018-06-14 12:37 | DenisChenu | Note Added: 48106 | |
2018-06-14 12:37 | DenisChenu | Note Edited: 48106 | |
2018-06-14 12:38 | DenisChenu | Note Edited: 48106 | |
2018-06-14 22:54 | Plano | Note Added: 48117 | |
2018-06-15 14:16 | c_schmitz | Assigned To | => dominikvitt |
2018-06-15 14:16 | c_schmitz | Status | new => assigned |
2018-06-15 14:58 | Changeset attached | => LimeSurvey master d9f60ac4 | |
2018-06-15 14:58 | guest | Note Added: 48160 | |
2018-06-15 14:58 | guest | Resolution | open => fixed |
2018-06-15 15:00 |
|
Status | assigned => resolved |
2018-06-15 15:00 |
|
Fixed in Version | => 3.11.x |
2018-06-15 15:30 |
|
Status | resolved => closed |
2018-06-15 17:57 | DenisChenu | Note Added: 48183 | |
2018-06-15 18:05 | Plano | Issue Monitored: Plano | |
2018-06-15 18:06 | Plano | Status | closed => feedback |
2018-06-15 18:06 | Plano | Resolution | fixed => reopened |
2018-06-15 18:06 | Plano | Note Added: 48185 | |
2019-05-13 14:09 |
|
Status | feedback => closed |
2019-05-13 14:10 |
|
Status | closed => resolved |
2019-05-13 14:10 |
|
Resolution | reopened => fixed |
2019-05-13 14:10 |
|
Status | resolved => closed |
2021-08-02 21:32 | guest | Bug heat | 6 => 8 |