Passing arguments to R script in command line (shell/bash): what to do when column names contain tilde (~)
You are successfully passing an argument that specifies a column name containing tilde. However, read.csv
has "fixed" the column names so it doesn't actually contain a tilde.
read.csv
is silently converting the column name to age.blah.value
. Use check.names = FALSE
to make it age-blah~value
.
data_raw <- read.csv(file = path_to_input, check.names = FALSE)