Problem to import SPSS database in R

Hi, I am using R console for the first time. I was trying to import SPSS file with Foreign but when I looked for variables, I couldn't find any variables.
EX:> library(foreign)

dosya<-file.choose()
data <-read.spss(dosya, to.data.frame=TRUE)
Ci sono stati 11 avvertimenti (utilizza warnings() per visualizzarli)
objc[54557]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff918183d8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x11a68bf50). One of the two will be used. Which one is undefined.
mean(MAP)
Errore in mean(MAP) : oggetto 'MAP' non trovato

Is there something wrong with your file?

Perhaps you could try in haven?

hallo @williaml i've tried but don't work.
Same problem. Thank you for reply me.

What does your data look like? Can you provide the output of head(data))?

I assume that MAP is a column in your file.

What if you tried mean(data$MAP)?

1 Like

It's working, thank you so much!! :pray:

1 Like

This topic was automatically closed 7 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.