reshape2 Schmelze Warnmeldung

Ich benutzemelt und die folgende Warnmeldung angezeigt:
attributes are not identical across measure variables; they will be dropped

Nachdem die Leute sich umgesehen haben, liegt es daran, dass die Variablen verschiedene Klassen sind. Dies ist jedoch bei meinem Datensatz nicht der Fall.

Hier ist der Datensatz:

test <- structure(list(park = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L), .Label = c("miss", "piro", "sacn", "slbe"), class = "factor"), 
    a1.one = structure(c(3L, 1L, 3L, 3L, 3L, 3L, 1L, 3L, 3L, 
    3L), .Label = c("agriculture", "beaver", "development", "flooding", 
    "forest_pathogen", "harvest_00_20", "harvest_30_60", "harvest_70_90", 
    "none"), class = "factor"), a2.one = structure(c(6L, 6L, 
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L), .Label = c("development", 
    "forest_pathogen", "harvest_00_20", "harvest_30_60", "harvest_70_90", 
    "none"), class = "factor"), a3.one = structure(c(3L, 3L, 
    3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("forest_pathogen", 
    "harvest_00_20", "none"), class = "factor"), a1.two = structure(c(3L, 
    3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("agriculture", 
    "beaver", "development", "flooding", "forest_pathogen", "harvest_00_20", 
    "harvest_30_60", "harvest_70_90", "none"), class = "factor"), 
    a2.two = structure(c(6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 
    6L), .Label = c("development", "forest_pathogen", "harvest_00_20", 
    "harvest_30_60", "harvest_70_90", "none"), class = "factor"), 
    a3.two = structure(c(3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
    3L), .Label = c("forest_pathogen", "harvest_00_20", "none"
    ), class = "factor")), .Names = c("park", "a1.one", "a2.one", 
"a3.one", "a1.two", "a2.two", "a3.two"), row.names = c(NA, 10L
), class = "data.frame")

Und hier ist die Struktur:

str(test)
'data.frame':   10 obs. of  7 variables:
 $ park  : Factor w/ 4 levels "miss","piro",..: 1 1 1 1 1 1 1 1 1 1
 $ a1.one: Factor w/ 9 levels "agriculture",..: 3 1 3 3 3 3 1 3 3 3
 $ a2.one: Factor w/ 6 levels "development",..: 6 6 6 6 6 6 6 6 6 6
 $ a3.one: Factor w/ 3 levels "forest_pathogen",..: 3 3 3 3 3 3 3 3 3 3
 $ a1.two: Factor w/ 9 levels "agriculture",..: 3 3 3 3 3 3 3 3 3 3
 $ a2.two: Factor w/ 6 levels "development",..: 6 6 6 6 6 6 6 6 6 6
 $ a3.two: Factor w/ 3 levels "forest_pathogen",..: 3 3 3 3 3 3 3 3 3 3

Ist es, weil die Anzahl der Ebenen für jede Variable unterschiedlich ist? Kann ich in diesem Fall die Warnmeldung einfach ignorieren?

Um die Warnmeldung zu generieren:

library(reshape2)
test.m <- melt (test,id.vars=c('park'))
Warning message:
attributes are not identical across measure variables; they will be dropped

Vielen Dank

Antworten auf die Frage(2)

Ihre Antwort auf die Frage