This can be done with pivot_wider from the tidyr package.
Given some data:
df <- data.frame(Material = c(93, 93, 93, 95),
Weight = c(11.627, 11.627, 11.627, 12.000),
AUn = c("HL", "LAP", "PAL", "HL"),
Denom = c(10605,1,1,11352),
Counter = c(99999,18,90,99999))
We can load the tidyr package and reshape the data:
library(tidyr)
df %>%
pivot_wider(names_from = AUn,
values_from = c(Denom, Counter),
names_glue = "{AUn}_{.value}", # order of words in headers
names_vary = "slowest") # order of headers
Result
# A tibble: 2 × 8
Material Weight HL_Denom HL_Counter LAP_Denom LAP_Counter PAL_Denom PAL_Counter
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 93 11.6 10605 99999 1 18 1 90
2 95 12 11352 99999 NA NA NA NA
BTW, it is best practice to provide data in your question in the form of code, not as a picture. Not only does that save work for people who want to help you, but it also helps reduce the potential for miscommunication. If you have an existing example of data you can share, the quickest way to do that is often with the magical dput function. For instance, if I had the df object in R and wanted to share the first two rows in a reproducible way, I could type dput(head(df, 2)) in the console in R and get some output that I could share. That code will be a recipe for others to recreate the exact same object.