Category: R

  • Export data from R to Excel

    Export data from R to Excel

    Here is how to export data from R to Excel. If you want to write an R data frame in an xlsx file, here are multiple ways how to do that. You can do that quickly or by customizing Excel file content formatting and structure.

  • How to filter by data frame row number in R

    How to filter by data frame row number in R

    RStudio data viewer is a great tool to look into data, but sometimes it is necessary to filter by data frame row number in R. By importing files, you might get a warning from parsing with a specified row number, and it might be necessary to do further investigation.

  • How to extract the pattern of numbers from text in R

    How to extract the pattern of numbers from text in R

    Here is how to extract phone numbers, ids, or any other pattern of numbers from text in R. With the help of regex, it is possible to do this seemingly complicated task easily.

  • dplyr: Adding missing grouping variable

    dplyr: Adding missing grouping variable

    The dplyr message about adding missing grouping variable might appear during a data wrangling process. In my case, when I was using function select from dplyr, the “Adding missing grouping variable” message was displayed, and an unnecessary column appeared in the result. You cannot remove this column as easily as usual.

  • filter in R

    filter in R

    Here are more than 5 examples of how to apply a filter in R to take a look or get a subset of your data. Depending on your goals solution might differ.

  • find and change where R packages are installed

    find and change where R packages are installed

    Here is how to quickly find out where R packages are installed. You can change the location where R packages are stored or loaded if necessary.

  • How to add a column to the R data frame

    How to add a column to the R data frame

    If you are new to R, one of the first questions might be how to add a column to the R data frame. Here are multiple scenarios that will help you to handle this task.

  • read Excel files in R

    read Excel files in R

    Excel is possibly the most popular tool in work with data, and it is good to know how to read Excel files in R. Unfortunately, there are multiple possible scenarios and Excel file formats that might be necessary to deal with. Some of the problems by reading Excel files in R might be prevented by…

  • determine rank in R

    determine rank in R

    Sometimes you have to calculate a rank in R to indicate an order by one or multiple criteria. It is done by using multiple principles and in various order. I will use dense rank that will not create gaps between ranks, and in the situation when something is identical, the ranks will also be identical.

  • Use data frame row as a column names in R

    Use data frame row as a column names in R

    Here is how to use data frame row as a column names in R, or, in other words, convert the data frame row as a header in R.