library(tidyverse)
Sp %>%
# filters for the species
filter(especievalida == "Geranium carolinianum") %>%
# creates a column for count
mutate(count = n())
Data
Sp <- read.table(text = "
fechacolecta aniocolecta especievalida fecha
1865-07-17 1865 'Geranium carolinianum' 1865-07-17
1865-07-17 1865 'Paspalum distichum' 1865-07-17
1890-07-27 1890 'Sporobolus pyramidatus' 1890-07-27
1893-05-02 1893 'Schiedeella durangensis' 1893-05-02
1893-05-07 1893 'Mesadenus polyanthus' 1893-05-07
1893-05-07 1893 'Mesadenus polyanthus' 1893-05-07",
header = T)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…