I have a dataframe with variables that I need to transpose along the table, using pivot_longer. First I need to transpose the columns Sample 1
Sample 2
Sample 3
Sample 4
with the column name "Sample". Then, for each of those names (Sample 1
, Sample 2
, Sample 3
and Sample 4
), I need to associate the values of columns VE
, VE_2
, VE_3
and VE_4
with the name of column "VE" and the values of columns u_VE
, u_VE_2
, u_VE_3
, u_VE_4
, with the name of column "u_VE" .
This is my original dataframe:
tibble::tribble(
~Cod_participante, ~Parametro, ~Muestra.1, ~Muestra.2, ~Muestra.3, ~Muestra.4, ~VE, ~VE_2, ~VE_3, ~VE_4, ~u_VE, ~u_VE_2, ~u_VE_3, ~u_VE_4,
2517, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
3796, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
4012, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
4266, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
4667, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
5284, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
6506, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
6628, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
9234, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
9609, "Aluminio total (Al)", NA, NA, NA, NA, 1.51, NA, NA, NA, 0.05, NA, NA, NA,
3796, "Arsenico total (As)", NA, NA, NA, NA, 0.701, NA, NA, NA, 0.0125, NA, NA, NA,
4012, "Arsenico total (As)", NA, NA, NA, NA, 0.701, NA, NA, NA, 0.0125, NA, NA, NA,
4266, "Arsenico total (As)", NA, NA, NA, NA, 0.701, NA, NA, NA, 0.0125, NA, NA, NA,
6506, "Arsenico total (As)", NA, NA, NA, NA, 0.701, NA, NA, NA, 0.0125, NA, NA, NA,
6628, "Arsenico total (As)", NA, NA, NA, NA, 0.701, NA, NA, NA, 0.0125, NA, NA, NA
)
#> # A tibble: 15 x 14
#> Cod_participante Parametro Muestra.1 Muestra.2 Muestra.3 Muestra.4 VE
#> <dbl> <chr> <lgl> <lgl> <lgl> <lgl> <dbl>
#> 1 2517 Aluminio~ NA NA NA NA 1.51
#> 2 3796 Aluminio~ NA NA NA NA 1.51
#> 3 4012 Aluminio~ NA NA NA NA 1.51
#> 4 4266 Aluminio~ NA NA NA NA 1.51
#> 5 4667 Aluminio~ NA NA NA NA 1.51
#> 6 5284 Aluminio~ NA NA NA NA 1.51
#> 7 6506 Aluminio~ NA NA NA NA 1.51
#> 8 6628 Aluminio~ NA NA NA NA 1.51
#> 9 9234 Aluminio~ NA NA NA NA 1.51
#> 10 9609 Aluminio~ NA NA NA NA 1.51
#> 11 3796 Arsenico~ NA NA NA NA 0.701
#> 12 4012 Arsenico~ NA NA NA NA 0.701
#> 13 4266 Arsenico~ NA NA NA NA 0.701
#> 14 6506 Arsenico~ NA NA NA NA 0.701
#> 15 6628 Arsenico~ NA NA NA NA 0.701
#> # ... with 7 more variables: VE_2 <lgl>, VE_3 <lgl>, VE_4 <lgl>, u_VE <dbl>,
#> # u_VE_2 <lgl>, u_VE_3 <lgl>, u_VE_4 <lgl>
Created on 2021-04-20 by the reprex package (v1.0.0)
Then I usie the command:
Pivot<-df2%>%pivot_longer(cols="Sample 1": "Sample 4",names_to = Sample")%>%pivot_longer(cols="VE": "VE_4",values_to = "VE").
My new dataframe multiply 4 times Sample 1 and so on for each sample, when there should be 1 VE value for Sample 1, instead of 4:
tibble::tribble(
~Cod_participante, ~Parametro, ~u_VE, ~u_VE_2, ~u_VE_3, ~u_VE_4, ~Muestra, ~value, ~name, ~VE,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
2517, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
3796, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
4012, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
4266, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
4667, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
5284, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
6506, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
6628, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
9234, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE", 1.51,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE", 1.51,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE", 1.51,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE", 1.51,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
9609, "Aluminio total (Al)", 0.05, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE", 0.701,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE", 0.701,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE", 0.701,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE", 0.701,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
3796, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE", 0.701,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE", 0.701,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE", 0.701,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE", 0.701,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
4012, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE", 0.701,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE", 0.701,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE", 0.701,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE", 0.701,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
4266, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE", 0.701,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_2", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_3", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 1", NA, "VE_4", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE", 0.701,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_2", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_3", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 2", NA, "VE_4", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE", 0.701,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_2", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_3", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 3", NA, "VE_4", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE", 0.701,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_2", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_3", NA,
6506, "Arsenico total (As)", 0.0125, NA, NA, NA, "Muestra 4", NA, "VE_4", NA,
)
#> # A tibble: 240 x 10
#> Cod_participante Parametro u_VE u_VE_2 u_VE_3 u_VE_4 Muestra value name
#> <dbl> <chr> <dbl> <lgl> <lgl> <lgl> <chr> <lgl> <chr>
#> 1 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE
#> 2 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE_2
#> 3 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE_3
#> 4 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE_4
#> 5 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE
#> 6 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE_2
#> 7 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE_3
#> 8 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE_4
#> 9 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE
#> 10 2517 Aluminio~ 0.05 NA NA NA Muestr~ NA VE_2
#> # ... with 230 more rows, and 1 more variable: VE <dbl>
Created on 2021-04-20 by the reprex package (v1.0.0)
Thank you.