Shubham Vats
4/11/2023
This repository contains R code to import a dataset and perform various operations like data processing and visualization on it.
- Select rows
- Select columns
- Create new columns
- Perform computation
- Merging
- Apply functions on data
- Counting
- Visualization
- Importing Dataset: The program imports a dataset named "DATA.csv" using the
read.csv()
function from thereadxl
package. - Selecting Rows and Columns: It selects specific rows and columns to display the names of food items available with the serial numbers provided.
- Creating New Column: A new column named "Tvitamins" with NULL values is created.
- Performing Computation: Computation is performed on the new column to count all the relevant nutrition contents in the data.
- Data Visualization: The program generates a summary and scatterplot of the total number of vitamins in food samples.
- Merging Columns: Two different columns are merged to get a better serial number combined with the ID of a product.
- Counting Data: The total number of rows and columns in the dataset is counted.
- Exporting Dataset: The dataset is exported into a new data file named "newdatasetcreated.csv" using the
write.csv()
function.
- Ensure that the dataset "DATA.csv" is present in the working directory.
- Execute the R code provided to perform the desired operations on the dataset.
- Review the output and visualizations generated to analyze the dataset.
- R programming language
readxl
package for importing datasets
This project is licensed under the MIT License - see the LICENSE file for details.