I used your code but it didn't work. I used filter() on other tables with the same code I commented at the beginning, (I just replaced the data source table) and it worked fine. So I think the problem is with my table.
The output is:
structure(list(Parametro = c("Aluminio total (Al)", "Aluminio total (Al)",
"Aluminio total (Al)", "Aluminio total (Al)", "Aluminio total (Al)",
"Arsénico total (As)", "Arsénico total (As)", "Arsénico total (As)",
"Arsénico total (As)", "Arsénico total (As)"), Tabla = c("Tabla 1",
"Tabla 2", "Tabla 3", "Tabla 4", "Tabla 5", "Tabla 1", "Tabla 2",
"Tabla 3", "Tabla 4", "Tabla 5"), Valor = c(5, 10, 1, 1, 10,
0.5, 1, 0.1, 0.2, 0.5)), row.names = c(NA, -10L), class = c("tbl_df",
"tbl", "data.frame"))
All the data is
1 Aluminio total (Al) Tabla 1 5.00
2 Aluminio total (Al) Tabla 2 10.00
3 Aluminio total (Al) Tabla 3 1.00
4 Aluminio total (Al) Tabla 4 1.00
5 Aluminio total (Al) Tabla 5 10.00
6 Arsénico total (As) Tabla 1 0.50
7 Arsénico total (As) Tabla 2 1.00
8 Arsénico total (As) Tabla 3 0.10
9 Arsénico total (As) Tabla 4 0.20
10 Arsénico total (As) Tabla 5 0.50
11 Cadmio total (Cd) Tabla 1 0.01
12 Cadmio total (Cd) Tabla 2 0.30
13 Cadmio total (Cd) Tabla 3 0.02
14 Cadmio total (Cd) Tabla 4 0.02
15 Cadmio total (Cd) Tabla 5 0.50
16 Cinc total (Zn) Tabla 1 3.00
17 Cinc total (Zn) Tabla 2 20.00
18 Cinc total (Zn) Tabla 3 5.00
19 Cinc total (Zn) Tabla 4 5.00
20 Cinc total (Zn) Tabla 5 5.00
21 Cobre total (Cu) Tabla 1 1.00
22 Cobre total (Cu) Tabla 2 3.00
23 Cobre total (Cu) Tabla 3 0.10
24 Cobre total (Cu) Tabla 4 1.00
25 Cobre total (Cu) Tabla 5 3.00
26 Cromo total (Cr) Tabla 1 NA
27 Cromo total (Cr) Tabla 2 NA
28 Cromo total (Cr) Tabla 3 2.50
29 Cromo total (Cr) Tabla 4 2.50
30 Cromo total (Cr) Tabla 5 10.00
31 Manganeso total (Mn) Tabla 1 0.30
32 Manganeso total (Mn) Tabla 2 3.00
33 Manganeso total (Mn) Tabla 3 0.50
34 Manganeso total (Mn) Tabla 4 2.00
35 Manganeso total (Mn) Tabla 5 4.00
36 NĂquel total (Ni) Tabla 1 0.20
37 NĂquel total (Ni) Tabla 2 3.00
38 NĂquel total (Ni) Tabla 3 0.50
39 NĂquel total (Ni) Tabla 4 2.00
40 NĂquel total (Ni) Tabla 5 4.00
41 Plomo total (Pb) Tabla 1 0.05
42 Plomo total (Pb) Tabla 2 0.50
43 Plomo total (Pb) Tabla 3 0.20
44 Plomo total (Pb) Tabla 4 0.20
45 Plomo total (Pb) Tabla 5 1.00
46 Selenio total (Se) Tabla 1 0.01
47 Selenio total (Se) Tabla 2 0.10
48 Selenio total (Se) Tabla 3 0.01
49 Selenio total (Se) Tabla 4 0.01
50 Selenio total (Se) Tabla 5 0.03
Thank you very much for your help.