0
Rの下では、色の組み合わせを生成しようとしていましたが、このあとで使用前の組み合わせをインポートし、すべての組み合わせに対してこれを削除し、組み合わせ。私はこれらの事前に使用されたものを取り除くのに苦労しました。ご協力いただきありがとうございます! はすべて、最高の - カルロス組み合わせのリストを作成して使用済みのものを削除する
rm(list=ls());ls()
library("gtools")
# Generate all colors combinations
colors<-c("RED","GREEN","BLUE","BLACK","PINK")
size.of.combinations<-4
all.possible.combinations<-permutations(length(colors),size.of.combinations,colors,repeats.allowed=T)
# Import used data
used.comb<- read.table(file = "used.txt", header = TRUE);
used.comb<-as.matrix(used.comb)
# Removed pre-used combinations
comb.available<-all.possible.combinations-used.comb #here is the problem
my.data<-data.frame(comb.available)
write.table(my.data, file = "data.csv", sep = ",", col.names = NA, qmethod = "double")
ありがとうございました!それは完全に動作します! –