View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
16888Bug reportsOtherpublic2020-12-28 18:34
Reporterf_funke Assigned To 
PrioritylowSeveritypartial_block 
Status confirmedResolutionopen 
Product Version4.3.30 
Summary16888: answer code with leading zero causes problems with data import in R
Description

This is about the automatically suggested question codes for closed-ended questions (e.g., radio buttons with list (radio) or arrays).

After changing the personal setting "Non-Numerical answer option prefix:" to blank/empty (so that no prefix should be used), the question codes are as follows:
Code Assessment Answeroption
01 0 my option A
02 0 my option B
03 0 my option C

The leading zero, however, leads to problems when importing data in R: The variables with question codes starting with a zero are recognized as a character variable, not a numeric variable.

The codes should start without the leading zero:
Code Assessment Answeroption
1 0 my option A
2 0 my option B
3 0 my option C

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)LS 4.3.29
I will donate to the project if issue is resolvedNo
Browser
Database type & versionLS Cloud
Server OS (if known)
Webserver software & version (if known)
PHP VersionLS Cloud

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2020-12-09 17:14

developer   ~60882

Why not add a settings : «number of or 0»

2 by default ?

f_funke

f_funke

2020-12-10 15:51

developer   ~60915

The leading zero makes sense when you use a prefix like "XY" so that it results in

Code | Assessment | Answeroption
XY01 | 0 | my option A
XY02 | 0 | my option B
XY03 | 0 | my option C

which is still sortable when you have more than 10 answer options.

DenisChenu

DenisChenu

2020-12-10 16:13

developer   ~60916

Last edited: 2020-12-10 16:13

Yes, and sometimes you need A000 for format (3 leading 0).

You think nobody want ##000 for format ? only ####0 ? or A00 ?

I thoink it can be great to have a solution to allow

A00
A000
A0000
A0
####0
###00
##000

Issue History

Date Modified Username Field Change
2020-12-09 17:12 f_funke New Issue
2020-12-09 17:12 f_funke Status new => assigned
2020-12-09 17:12 f_funke Assigned To => cdorin
2020-12-09 17:12 f_funke File Added: 201209_answer_code_leading_zero.png
2020-12-09 17:14 DenisChenu Note Added: 60882
2020-12-10 15:51 f_funke Note Added: 60915
2020-12-10 16:13 DenisChenu Note Added: 60916
2020-12-10 16:13 DenisChenu Note Edited: 60916
2020-12-28 18:34 cdorin Assigned To cdorin =>
2020-12-28 18:34 cdorin Priority none => low
2020-12-28 18:34 cdorin Status assigned => confirmed