bind colum

stud<-cbind(stud,"deptno")
> stud
  stud_id   name marks   adm_date  dept "deptno" "deptno"
1       1   bill    90 2018-11-01   mca   deptno   deptno
2       2  steav    80 2018-11-01   bca   deptno   deptno
3       3   mark    99 2018-11-01   mba   deptno   deptno
4       4 stephn    98 2017-11-01   phd   deptno   deptno
5       5  alien    96 2016-11-01 bscit   deptno   deptno
> stud$"deptno"<-c(1,2,3,4,5)

Post a Comment

Previous Post Next Post