Friday, June 01, 2018

Renaming the Columns of a R data set


Syntax

names(data set name)[column number] <- "new column name"

example data set with column names

1. S.No
2. Patient Name
3. Age

names(example)(2) <- "Name"

It will change the "Patient name" into "Name"



No comments: