Friday, August 15, 2014

Data Frame Manipulation in R

setwd("f:/coursera/coursera/exploratory data analysis")
options(stringsAsFactors=F)
student <- c("dilir","saif","enam","rafiq")
studentn <- c(916,914,937,891)
mark <- c(400,300,250,500)
students <- data.frame(student, studentn)
marks <- data.frame(studentn, mark)
saveRDS(students,"students.rds")
saveRDS(marks, "marks.rds")
rm(list=ls())

students <- readRDS("students.rds")
marks <- readRDS("marks.rds")
students

students <- rbind(students,data.frame(student="selim", studentn=934))
students
students <- students[students$student!='selim',]
students

1 comment:

  1. Thank you so much for sharing this worth able content with us. The concept taken here will be useful for my future programs and i will surely implement them in my study. Keep blogging article like this.

    R Programming Online Training|
    Hadoop Online Training
    Data Science Online Training|

    ReplyDelete