Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
x <- 0
if(x == 0) print("foo")
x <- 1
if(x == 0) print("foo")
if(x == 0) print("foo") else print("bar")

View file

@ -0,0 +1,2 @@
x <- 2
switch(x, print("Print if x == 1"), print("Print if x == 2"))

View file

@ -0,0 +1,4 @@
x <- 3
switch(x, print("Print if x == 1"), print("Print if x == 2"))
x <- 2.7
switch(x, print("Print if x == 1"), print("Print if x == 2 or if there is rounding to 2"))

View file

@ -0,0 +1,6 @@
x <- "match"
switch(x, mat = 0, match = 10, other = 100, 1000)
x <- "ma"
switch(x, mat = 0, match = 10, other = 100, 1000)
x <- "foo"
switch(x, mat = 0, match = 10, other = 100, 1000)

View file

@ -0,0 +1,2 @@
data <- c(1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0)
ifelse(data == 1, "Yes", "No")