I have a dataset which contain some 200 fields and 1000000 of records as per below format:
Acc Field1 Field2 Field3 .....
101 23 34 78
102 6 1.2 89
.
.
.
When I enter command
apply(dat3[varlist[9]],2,is.numeric)
I get confirmation of field name with TRUE as a result, but when I try to test as is.numeric(dat3[varlist[9]])
, I receive a FALSE as a result.
where dat3 is the dataframe on which I am working on and varlist is created using command:
varlist <- names(dat3)
varlist contains all the list of variables in the data frame.
Attached is the real time screenshot.
I don't understand what I am doing wrong over here.
Any help from anybody is appreciated.