Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
strip_comments <- function(str)
|
||||
{
|
||||
if(!require(stringr)) stop("you need to install the stringr package")
|
||||
str_trim(str_split_fixed(str, "#|;", 2)[, 1])
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
x <-c(
|
||||
"apples, pears # and bananas", # the requested hash test
|
||||
"apples, pears ; and bananas", # the requested semicolon test
|
||||
"apples, pears and bananas", # without a comment
|
||||
" apples, pears # and bananas" # with preceding spaces
|
||||
)
|
||||
strip_comments(x)
|
||||
Loading…
Add table
Add a link
Reference in a new issue