Lỗi variable name contains an illegal character spss
Following on this issue, I also got an error while trying to save the data as .sav. It turns out that illegal characters are more than just a "." . Illegal characters include spaces, hyphens, apostrophes, and square brackets. This line worked for me, after spending three hours debugging the code. Maybe a better error message would have helped, something like "check if your variable names include a white space, hyphen, apostrophe, square bracket, etc" Hiện tại, Super Render VN hỗ trợ hầu hết các software, renderers và plugin 3D phổ biến như 3D Max, Blender, C4D, Maya, Arnold, V-Ray, Corona, Redshift, Houdini, After Effect, v.v … Hãy thử trải nghiệm dịch vụ cloud render farm tại đây HTML SPSS allows you to rename variables either via its Variable View or by using syntax. There are a number of rules governing the naming of variables. Rules & Best Practices for Naming Variables
*************** That’s it, short and sweet. If you follow those rules when naming variables, you’re not going to go wrong. I wanted to export a Jamovi database to SPSS (.sav file). However, when I tried to do so, I got a quickly disappearing message saying "save failed a provided name contains an illegal character" (this also occurred to .sas7bdat, .xpt, and .dta files). Changing the filename did not solve the issue. Exporting as .RData worked, however. Thanks to a stackoverflow post (1) I then proceeded to export the data from R/RStudio which basically gave me the same answer, namely: "Error in write_sav_(data, normalizePath(path, mustWork = FALSE), compress = compress) : Writing failure: A provided name contains an illegal character." Further research led me to yet another stackoverflow post (2) that made me realise that by "name", the error message meant "variable name". I noticed that one variable name had a * (star) character which I changed for an X and 3 other variable names that had a - (minus) character that I promptly removed. After that export went as a breeze (but only for .sav / SPSS files, it did not work for .sas7bdat, .xpt, and .dta files; that is why I did not dare answer to the "Error exporting the data as SPSS or dta" post (3)). I wonder if pasting as plain text into word first and then to paste into SPSS would work? Possibly some formatting is being inserted by excel that SPSS doesn't like? Worth a shot if not tried already |