Why nrow
/NROW
is not giving results without decimal expression in R?
I tried calculating the number of rows in R and did not get results with nrow
/NROW
.
I tried the summary
option but with that, I have to provide decimal expression.
I rounded the column using df$WAGE_RATE <- round(df$WAGE_RATE, digit = 0)
> class(h1b$WAGE_RATE)
"numeric"
> nrow(df$WAGE_RATE < '1000000')
NULL
> nrow(df$WAGE_RATE < '1000000.00')
NULL
> summarise(df, ct = sum(as.numeric(WAGE_RATE < '100000')))
A tibble: 1 x 1
ct
<dbl>
1 0
> summarise(df, ct = sum(as.numeric(WAGE_RATE < '100000.00')))
A tibble: 1 x 1
ct
<dbl>
1 9052