Import Dataset - Error unexpected '\\' in database

Hello!

I'm trying to import a dataset I am not the owner of in RStudio.
This dataset was originally made for SPSS (.sav) and I tried to open it using the 'Import Dataset' button multiple times.
The preview works fine and I can see the different columns of my dataset but then when I click 'Import', I get two error messages reading 'Error: unexpected '\' in "file_name"' and "Error: unexpected '\' in "view(file_name)".
I wonder if this unexpected '\' error has to do with separators but I don't really know how to check.
Is there any way to solve this, knowing that I'm not the owner of the database?

Thanks a lot for your help!
Paul

There’s {haven}for that.

I had already loaded it before the error came up... :confused:

what was the preview-code that import datasets generated for you to import with ?

Here was the preview code:

library(haven)
OURT_3_Base_de_donn�_es <- read_sav("~/Études/Doctorat/Méthode/Groupe ElementR/Test avec données ObSoCo/data/OURT 3 - Base de données.sav")
View(OURT_3_Base_de_donn�_es)

Okay I found why it kept glitching as I read the preview code: it was just a silly question of diacritics I had not got rid of...
Thanks a lot!

2 Likes

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.