This tutorial is going to cover how to create a data frame in R. We’re going to get through how to: Create data frames from Vectors. Create data frames from existing data frames. Create data frame a List. 1. Create… Continue Reading →
In this tutorial, we’re going to show how to remove or delete a column of a data frame in R. 1. Preparation Let’s create a data frame which will be used for all examples in this tutorial:
1 2 3 4 5 6 7 |
name <- c("mary", "al", "bea", "carol") age <- c(5, 6, 7, 4) hair <- c("blond","brown", "black", "blond") eye <- c("blue" ,"brown", "green", "black") # Create data frame children <- data.frame(name, age, hair, eye) |
And let’s… Continue Reading →
This tutorial is going to illustrate how to sort or order a data frame in R. 1. Preparation Let’s assume that we have a small data frame about books as follows, which will be used for all examples in this… Continue Reading →
In this article, we will show you how to write CSV file in R. If we’re familiar with R, we can leverage it to support us in getting, cleaning and processing data. After that, we can export R into different file formats… Continue Reading →
This tutorial is going to cover how to add a column to a data frame, which is often required when we manipulate our data using the data frame in R. 1. Preparation Let’s say that we have a data frame… Continue Reading →
In this article, we’d like to show you how to rename data frame columns in R by using R base functions or other libraries such as dplyr, plyr, which is often needed when manipulating our data. 1. Preparation We will… Continue Reading →
© 2024 HowToProgram — Powered by WordPress
Theme by Anders Noren — Up ↑