Hello everyone!
I am new to R and am trying to understand some codes that other people have written. The code I am focusing on right now was written by @andresrcs in this thread:
df %>%
pivot_longer(c("PA", "PUA"), names_to = "type") %>%
ggplot(aes(y = Country, x = value, fill = type)) +
geom_col() +
scale_x_continuous(labels = scales::percent_format(scale = 1))
#> Error in df %>% pivot_longer(c("PA", "PUA"), names_to = "type") %>% ggplot(aes(y = Country, : could not find function "%>%"
Created on 2021-12-10 by the reprex package (v2.0.1)
As you can see, andresrcs writes "10L" in the c() function following row.names. What does "-10L" mean? From what I understand, including "-10L" will produce a data frame with 10 rows. But I cannot find any instruction document to confirm that. Furthermore, why is the integer negative (-10 instead of 10)? Does it have something to do with the "L" element?