How to convert units in R like ft to m or lbs to kg
Here is a simple solution that helps to convert units in R and, in this case, feet to meters and pounds to kilograms. It is not always straightforward, and you have to do additional data transformations to get to the point where you can do the unit conversion in R.
in
4 ways how to create a gradient word cloud in R
If you have a gradient word cloud in R, then besides the size of each word representing results, an additional indicator is also the color. Here are 4 ways how to create that kind of word cloud in R using packages like ggplot2, quanteda, wordcloud, and wordcloud2.
How to join year, month, and day into a date in R
Here is how to join year, month, and day into a date in R if they are stored separately. There are at least two good ways how to combine them in date. In some situations, there might be only a year and month and creating a date for the first day of the month is…
in
How to convert string to date in R
Here is how to convert a string to a date in R. A string might contain a date for various reasons. Those reasons change the complexity of the solution. For example, you might have a date as a string after extracting date from a date-time or merging separate date components. Sometimes it might happen by…
in
Why as.Date function returning the wrong date in R
If you are converting a string to date, there might be a situation where function as.Date returning the wrong date in R. In that scenario, the key is to specify the format correctly.
in
How to create a gradient line chart in R
The gradient line chart in R is a little bit artistic approach to emphasize ups and downs or progression. A gradient line chart will be made with two directions of the color gradient using ggplot2. The first one will be vertical and the second horizontal.