在以下代码的末尾我想打印n_species
,但我首先要打印“物种数量”,然后是值。我怎样才能做到这一点?
n_species <- 0
n_invisibility <- 0
for(i in Species) {
n_species <- n_species + 1
for(i in Invisibility){
if(i == "Y") {
n_invisibility <- n_invisibility + 1
}
else {
n_invisibility <- n_invisibility + 0
}
}
}
print(n_species)
print(n_invisibility)