Sometimes you have a huge data with multiple fields and the data stored in your file is not marked with header information (i.e. column names).
To add column names to your data frame or matrix after it is read into a variable run the following command:
To add column names to your data frame or matrix after it is read into a variable run the following command:
> CustColName <- c("time", "Age", "Surname", "Standard", "RollNo", "Name") > colnames(StudData) <- CustColName
No comments:
Post a Comment