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.

How to add text labels on Excel scatter chart axis

By default, you can not add text labels on Excel scatter chart axis, but here is a workaround that allows you to do that. You can change Excel scatter chart horizontal or vertical axis labels using a dummy series. Here is how to do that in a few simple steps.

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 create and preview hex color code sequence in R

By creating a hex color code sequence in R, you can use that for the color gradient in visualizations. There are multiple ways how to achieve that.

How to create a repeated number sequence in R

Sometimes it is necessary to generate not only a simple number sequence but a repeated number sequence in R. Here is how to do that.

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… Continue reading How to join year, month, and day into a date in R

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… Continue reading How to convert string to date in R

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.

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.

How to remove legend or guide in ggplot2

Here is how to remove legend in ggplot2, also known as a guide. There are multiple ways how to do that depending on the situation. On the other hand, if you are looking at why the ggplot2 legend is not showing, there might be a chance that somewhere in the script it is suppressed.

Exit mobile version