Created
December 19, 2021 22:20
-
-
Save eyberg/923a9dee167c69865895123c59169399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eyberg@s1:~/r$ cat config.json | |
{ | |
"files":["hi.r"], | |
"Args":["hi.r", "--args", "hello","you"] | |
} | |
eyberg@s1:~/r$ ops pkg load R_3.4.4 -c config.json | |
booting /home/eyberg/.ops/images/R ... | |
en1: assigned 10.0.2.15 | |
[1] "hello you" | |
Warning message: | |
system call failed: Function not implemented | |
exit status 1 | |
eyberg@s1:~/r$ cat hi.r | |
say_hello_arg <- function(greet, name) { | |
args <- commandArgs(TRUE) | |
name <- args[2] | |
greet <- args[1] | |
message <- paste(greet, name, sep = " ") | |
print(message) | |
} | |
say_hello_arg(greet, name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment