-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strsplit(x, split = ";") error #31
Comments
Hi! Thanks for trying out the package. That looks suspiciously like a bug 🐛 in the function that parses the tag, so I think the problem is at my end. I doubt it's anything to do with your R environment (methods is one of the base packages, so you're all set there). Almost certainly the issue is that I didn't write very robust code for handling the inputs there. I'll aim to take a look at this soon, and thanks so much for reporting the problem! Best, |
I think the root of this issue comes down to options(stringsAsFactors = FALSE) |
Ag, that makes sense. Thanks Garrick. I guess stringsAsFactors really is = . I got a new laptop and upgraded to version 4.1.1 and the problem does not exist there. |
Brilliant, thanks @gadenbuie! I'll merge #38 now, hopefully fixing this! Thanks for opening the issue @sciencificity |
* Protect against non-character weirdness with tags and labels Fixes #31 * Add NEWS item
Dear Danielle,
Thank you for this package. I am keen to use it to create neat little cards for code snippets for myself (and anyone else who stumbles on it) on my distill blog.
I downloaded the CRAN bs4cards and ran the example code of
in an RMarkdown document with the ffg. in the YAML header:
I get an error as follows however: "Error in strsplit(x, split = ";") : non-character argument Calls: ... dots_list -> card_class -> unique_tags -> unlist -> strsplit"
I tried adding tags as follows and I experience the same error.
I also copied the unique_tags and card_class functions into my R code, and ran it on
card_class(paste0("All;", "R"))
which worked 100%.The only package I do not have is
methods
which is in the imports section. I am unsure if that is the issue but I cannot find a CRAN version of it. I tried to do a reprex but the error experienced is that it could not find function '%>%' which is not the problem I am experiencing (I also purposely loaded magrittr, which made no difference). I am on version 3.6.3 of R but the depends is > 2.10, so I am hoping it is not that. I suspect I am doing something stupid or missing something essential and I would appreciate the help.My sessionInfo:
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=English_South Africa.1252
[2] LC_CTYPE=English_South Africa.1252
[3] LC_MONETARY=English_South Africa.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_South Africa.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] reprex_2.0.1 bs4cards_0.1.0
loaded via a namespace (and not attached):
[1] rstudioapi_0.13 knitr_1.33 magrittr_2.0.1
[4] R6_2.5.0 rlang_0.4.11 fastmap_1.1.0
[7] fansi_0.4.2 highr_0.8 styler_1.3.2
[10] tools_3.6.3 xfun_0.21 utf8_1.2.1
[13] cli_2.3.1 clipr_0.7.1 withr_2.4.1
[16] htmltools_0.5.2 ellipsis_0.3.1 assertthat_0.2.1
[19] yaml_2.2.1 digest_0.6.27 tibble_3.1.0
[22] lifecycle_1.0.0 crayon_1.4.1 processx_3.5.0
[25] callr_3.6.0 purrr_0.3.4 ps_1.6.0
[28] vctrs_0.3.7 fs_1.5.0 rsconnect_0.8.16
[31] glue_1.4.2 evaluate_0.14 rmarkdown_2.10
[34] compiler_3.6.3 pillar_1.5.1 backports_1.2.1
[37] pkgconfig_2.0.3
PS: I first tried it on a new page I was creating on my distill blog where I downloaded and used the "strapless.css":
Thank you!
The text was updated successfully, but these errors were encountered: