renaming objects unused names

Hi, I'm trying to rename objects from my subset data with the package memisc, but always getting this error:

dat <- rename (dat, 
           v_382 = "mann",
           v_1033 = "Alter",
           v_384 = "Bildung",
           v_217 = "Klimawandel?",
           v_1996 = "zukünftige Generationen D",
           v_1997 = "zukünftige Generationen",
           v_225 = "Parteiwahl"
)

In rename(dat, v_382 = "mann", v_1033 = "Alter", v_384 = "Bildung", : unused name(s) selected

Does anyone know what I am doing wrong? Thanks a lot!

What kind of object is dat? You can check using class(dat).

I believe its a warning, not an error.
It means you are trying to rename something (x) to somethingelse (y) but there is no x in your data so you get the warning.

dat <- rename (dat, 
           v_382 = "mann",
           v_1033 = "Alter",
           v_384 = "Bildung",
           v_217 = "Klimawandel?",
           v_1996 = "zukünftige Generationen D",
           v_1997 = "zukünftige Generationen",
           v_225 = "Parteiwahl",
        warn = FALSE) 

is possible

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