I am looking for something in R, where assume we have a 24 columns with some random values, also assume post 12th column, every columns are blank.
Now, I punch in a number, like to test, assume, if it is 10, it will check, whether do you have any values beyond 10th column, if it is 20, it will check whether do you have any values beyond 20th column. Can you guys help me out in excel or R. I think a loop needs to be created.
What an interesting puzzle. I suppose you could do something like this. This function returns TRUE when all columns from start_col onwards are empty and FALSE if any values are found.
There are existing tools in packages that can give you insight on the data.frame contents. for example skimr package has skim() function, which will give you many facts about your data.frame. If it was the case that there were many unpopulated columns, I would notice it easily if I skimr::skim(mytable)