0
require("readxl")
excelFile<-read_excel("C:/PathtoExcel.xlsx")

I want to iterate through the excelFile so I get each column's value in each row in the excel sheet how do I do that?

I want to do that for following problem:

I have an excel sheet with 3 columns and 163 rows. The data in each column's row is of type integer that can be 0 or greater. I want to go through Column's rows and count the number of consecutive 0s in a column. Let say I have a column

1 0 0 1 0 0 0 5 0 0 10

so the result would be (2 + 3 + 2 )/3 where 2, 3, 2 are the consecutive 0s in the column

hariszaman
  • 8,202
  • 2
  • 40
  • 59

0 Answers0