R Project for Statistical Computing

Reading and Writing CSV data

R is one of the most successful languages in the data science community primarily because of its user-friendly ecosystem. Reading and writing CSV files is one of the most common operations in Data Science and hence is in-built in R and does not need installation of new packages. This task will introduce you to some common functions and how easy, it is to deal with data frames in R.

Tasks:
  1. Read a CSV file from your local computer along with its headers and convert it into a data frame.
  2. Print the first few members of the data frame using an in-built function in R.
  3. Create a new data frame student in R with at least 5 observations and 3 variables, name, age and class.
  4. Add a new column height into the data frame and then add a new row into the data frame.
  5. Export the data frame into a CSV file students.csv.
  6. Read a CSV file from the internet directly into R without downloading the file manually and print the first few members.

You can find help on this at the following links: https://www.tutorialspoint.com/r/r_csv_files.htm https://www.cyclismo.org/tutorial/R/input.html#reading-a-csv-file

Attach screenshots of the task executing on your machine. Upload your code on Github including a README highlighting all your steps and submit a link to the repository.

Task tags

  • r

Students who completed this task

VE FORBRYDERNE, haiyu.jiang, dzejqub, Abhishek.Kuchibhotla, ZeroDawn.0D, programmingwizard, Ansh, Jack104, Nikhil Acharya, Sid Dubey, Mani, Guilherme Marcelo, MatthewS, tkp, Jagannath

Task type

  • code Code
  • chrome_reader_mode Documentation / Training

Level

Beginner
close

2019