Introducing My First CRAN Package: xutils

less than 1 minute read


Introducing My First CRAN Package: xutils

I just submitted my first R package xutils to CRAN and got accepted! The package website is here.

This is a package that contains several (currently only one) functions that I found useful and don’t have mature solution out there. Hence I decided to put together such a package for future use easier.

Fast and efficient function for decoding HTML entities in R

I have introduced a function html_decode in the package, where it maps HTML entities back to their original UTF-8 characters.

An example would be:

# load library
# create test strings
strings <- c("abcd", "&amp; &apos; &gt;", "&amp;", "&euro; &lt;")
# decode
## [1] "abcd"  "& ' >" "&"     "€ <"

Leave a Comment

Your email address will not be published. Required fields are marked *