View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
20673Bug reportsImport/Exportpublic2026-09-07 03:34
Reporterujtwrujtwr Assigned To 
PrioritynoneSeverityblock 
Status newResolutionopen 
Summary20673: Variable names are corrupted when exporting responses in R format
Description

When exporting responses in R format using “R (syntax file)”, the variable names (column names) for options in single-choice, multiple-choice, and other question types appear to have been replaced with internal identifiers.

Previously, these names followed a format such as {Question Code}_{Option Code}. This change has broken all of our R analysis scripts that rely on the previous naming convention.

The downloaded R syntax file contains the following code:


LimeSurvey Field type: F

data[, 10] <- as.numeric(data[, 10])
attributes(data)$variable.labels[10] <- "[Option A] Question 01"
data[, 10] <- factor(data[, 10], levels=c(1,0),labels=c("Yes", "Not selected"))
names(data)[10] <- "Q01__S3289"

LimeSurvey Field type: F

data[, 11] <- as.numeric(data[, 11])
attributes(data)$variable.labels[11] <- "[Option B] Question 01"
data[, 11] <- factor(data[, 11], levels=c(1,0),labels=c("Yes", "Not selected"))
names(data)[11] <- "Q01__S3290"

LimeSurvey Field type: F

data[, 12] <- as.numeric(data[, 12])
attributes(data)$variable.labels[12] <- "[Option C] Question 01"
data[, 12] <- factor(data[, 12], levels=c(1,0),labels=c("Yes", "Not selected"))
names(data)[12] <- "Q01__S3291"
....

In statements that assign column names, such as names(data)[10] <- "Q01__S3289", the option identifier does not match the answer option code configured in the attached screenshot.

CSV and Excel exports appear to retain the original column names.

Steps To Reproduce

Steps to reproduce

  1. Create multiple-choice and single-choice questions.
  2. Add several answer options to each question.
  3. Activate the survey and submit some test responses.
  4. From the response export screen, download the R script for importing the data by selecting “R (syntax file)”.
  5. From the same screen, download the R data file.
  6. Run the R syntax file to import the data.

Expected result

The data is imported with column names in the format {Question Code}_{Option Code}.

Actual result

The column names appear to be unpredictable internal identifiers.

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 7.0.14+260904
I will donate to the project if issue is resolvedYes
Story point estimate0
Browserfirefox / chrome
Database type & versionmysql 8.0.45
Server OS (if known)Linux
Webserver software & version (if known)Apache 2.4
PHP Version8.3.29

Users monitoring this issue

There are no users monitoring this issue.

Activities

ujtwrujtwr

ujtwrujtwr

2026-09-07 03:34

reporter   ~85588

Example of the question settings screen

fig01.png (49,972 bytes)   
fig01.png (49,972 bytes)   

Issue History

Date Modified Username Field Change
2026-09-07 03:33 ujtwrujtwr New Issue
2026-09-07 03:34 ujtwrujtwr Note Added: 85588
2026-09-07 03:34 ujtwrujtwr File Added: fig01.png
2026-09-07 03:34 ujtwrujtwr Bug heat 0 => 2