I run the following code on Ubuntu (WSL2) by using Rscript. The error states p_description is a unknown column. But it is clearly a correct column. Please help. Thank you.
df_prod <- readr::read_csv(file_prodef) %>%
dplyr::rename_with(~paste0("p_", .x)) %>%
dplyr::mutate(a = substring(p_description, 1, 1))
The outcome on Rstudio IDE [Ctrl + Enter] - pic_1.
The outcome on Ubuntu [Rscript transform.R] - pic_2.