I have one data frame which has column header but position of coulmn header is not fixed so can i read non empty value in 1st column to get the index of header to process the file.
mydata.txt
test 34 45
rt 45 56
tet3 67 56
Col1 Col2 Col3 Col4 Col5
45 45 23 56 12
34 45 67 65 32
45 67 78 90 54
56 43 32 12 45
mydata = read.table("mydata.txt")
mydata[,1] #how to find first non blank value in first column?
In order simplify the about pblm:
df<-c("","","",34,23,45)
how to find fiest non blank value in df