我與R et Rstudio一起工作,我遇到了問題。如何在R中分配2個向量中的字符串
首先,我有2個向量:
cap-color
cap-color
odor
odor
odor
odor
gill-spacing
gill-size
gill-color
stalk-surface-above-ring
stalk-color-above-ring
spore-print-color
spore-print-color
population
population
AND:
buff
pink
creosote
foul
musty
pungent
close
narrow
buff
silky
cinnamon
chocolate
green
scattered
several
現在,我想的輸出:
cap-color ∈ {buff, pink}
odor ∈ {creosote, foul, musty, pungent}
gill-spacing = {close}
gill-size = {narrow}
gill-color = {buff}
stalk-surface-above-ring = {silky}
stalk-color-above-ring = {cinnamon}
spore-print-color ∈ {chocolate, green}
population ∈ {scattered, several}
'帽色< - C(「淺黃色」,「粉紅色」)' – Andrie