You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hallo,
when creating a sav file with more than 10.000 columns the column names are probably repeated.
In the code bellow I couldn´t show the repetition of names because read_sav corrects duplicate names. read.spss does not import the file. Opening the file in Statistica showed duplicated names.
The same occurs with varying the names to random strings of 32 letters.
library(foreign)
library(tibble)
# create data frame with more than 10k columns and export
randomDF <- data.frame(as.list(1:10001))
# write sample files
write_sav(randomDF[1:10000], "test1.sav")
write_sav(randomDF[1:10001], "test2.sav")
# error reading system-file header
if (F) foreign::read.spss("test2.sav")
# reimport corrects duplicate names (first & last position)
data_frame(
column_position = 1:10001,
a = c(names(read_sav("test1.sav")), rep("-", 1)),
b = names(read_sav("test2.sav"))
) %>%
filter(a != b)
Thanks!
The text was updated successfully, but these errors were encountered:
Majid-Eismann
changed the title
write_sav: wrong column names for tables with more then 10k columns
write_sav: wrong column names for tables with more than 10k columns
Oct 9, 2018
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
lockbot
locked and limited conversation to collaborators
Jul 22, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hallo,
when creating a sav file with more than 10.000 columns the column names are probably repeated.
In the code bellow I couldn´t show the repetition of names because read_sav corrects duplicate names. read.spss does not import the file. Opening the file in Statistica showed duplicated names.
The same occurs with varying the names to random strings of 32 letters.
Thanks!
The text was updated successfully, but these errors were encountered: