yeah, they dont show in output.
I thought better of you codewars (lol)
p <- function() { x <- c(1:10) plot(x**2) }
print("Hellow")#THis doesnt work becasue R is not supported yet- p <- function() {
- x <- c(1:10)
- plot(x**2)
- }
# NO TESTCASES p()
- # NO TESTCASES
- p()
Delete items from {a} that are present in {b}.
Woohooo fun fun fun!
Justa small challeng.
(IF nil FROM EMPTY LISTS: print("EmPtY!")!!! )
agck
procelim <- function(a,b) {
if (length(a) > 0 && length(b) > 0) {
a[!a %in% b]
} else {
print("EmPtY!")
}
}
# You can test with testthat (http://r-pkgs.had.co.nz/tests.html#test-structure)
# TODO: replace with your own tests (TDD), these are just here to demonstrate usage.
actual <- procelim
test_that("example", {
expect_equal(actual(c(),c()), "EmPtY!")
expect_equal(actual(c(1,2,3,4,5,6,7,8,9),c(1,8,0,5)), c(2,3,4,6,7,9))
})
action <- c("Hello", "Goodbye", "Afternoon") who <- c("Garry", "World", "R") greet <- function () print(paste(action[1], who[2], "!", sep=" ", collapse=NULL))
c("Hello World!")- action <- c("Hello", "Goodbye", "Afternoon")
- who <- c("Garry", "World", "R")
- greet <- function () print(paste(action[1], who[2], "!", sep=" ", collapse=NULL))
# You can test with testthat (http://r-pkgs.had.co.nz/tests.html#test-structure) # TODO: replace with your own tests (TDD), these are just here to demonstrate usage. test_that("example", { expect_equal(greet(), "Hello World !") })
- # You can test with testthat (http://r-pkgs.had.co.nz/tests.html#test-structure)
- # TODO: replace with your own tests (TDD), these are just here to demonstrate usage.
- test_that("example", {
- expect_equal(greet(), "Hello World !")
- })