I want to get column Names of CSV data and apply some functions on column name.
I tried the following code, but the output just returns data type
reading_data <- read.csv("test.csv")
print("Header Row:")
print(reading_data[0,]) # This gives me a list of column names correctly
print(class(reading_data[0,])) # O/P is: "data.frame"
print("++++++++++++++++++++++++++++")
for(i in 1:ncol(reading_data)){
print(reading_data[0,i]) # O/P is: numeric(0) ; I want string value of data name here.
}