Hi there I'm performing a colour analysis on photographs in R studio and really struggling with the error I am getting. I am trying to convert "RGB to s single colour code value" using reshape2 and metl and getting various errors.
the code:
fr.kmeans.clusters
fr.kmeans.clusters.long <- reshape2::melt(fr.kmeans.clusters); names(fr.kmeans.clusters.long)[3] <- "photo.id";
fr.kmeans.clusters.long$id <- substr(fr.kmeans.clusters.long$photo.id,0,7); fr.kmeans.clusters.long
fr.kmeans.clusters.long$wing.colour.type <- rep(c( "black", "yellow","red"), length(listimages)); fr.kmeans.clusters.long
with the second line of code the error is: "No id variables; using all as measure variables"
3rd line: "No id variables; using all as measure variables"
4th line (after an output of 250 values): "[ reached 'max' / getOption("max.print") -- omitted 9750 rows ]"
4th line: "Error in $<-.data.frame
(*tmp*
, wing.colour.type, value = c("black", :
replacement has 1875 rows, data has 10000"
I have over 1400 photographs, What should I do to fix this? What exactly is causing the problem?