I'm trying to pass an array of hundreds of elements as an argument of an R script via command line in Windows. Firstly, I'd like to declare my array in some way. I'm doing that in command line:
set my_array=c(0,1,2,3,4,5,6,7,8,9,...,700)
Then I want to run my script and get the array as argument.
Rscript my_script my_array
But when I try this an error message came up saying that 'the object my_array" could not be found. I know how to get the arguments in my script, using args <- commandArgs(TRUE). I just need to recognize my declared array as an argument - or declare it in the right way and pass it in the right way as an argument to my script.
Thanks!