# Understand a command N!=0

Hello

I have this program

</>
A <- F2 %>% filter(NPC==Distinct_NPC[k,] & PAIS_COD==Distinct_PAIS[j,] & NC8==Distinct_NC8[i,])
N <- nrow(A)

``````if(N!=0) {
B <- A\$VF

NPC <- Distinct_NPC[k,]
PAIS_COD <- Distinct_PAIS[j,]
NC8 <- Distinct_NC8[i,]

C <- F2_2018 %>% filter(NPC==Distinct_NPC[k,] & PAIS_COD==Distinct_PAIS[j,] & NC8==Distinct_NC8[i,] & MES_REF==1)
D <- nrow(C)
ifelse(D==0, VF <- 0, VF <- C\$VF)

#Nova Linha
New <- data.frame(NPC, PAIS_COD, NC8, VF, Lim_Inf, Lim_Sup, Res_2MAD, N)

#Para o primeiro registo criar data frame (tabela)
if(k==1 & j==1 & i==1) {NPC_PAIS_NC8_VF <- data.frame(NPC, PAIS_COD, NC8, VF, Lim_Inf, Lim_Sup, Res_2MAD, N)}

#Se a tabela já criada acrescentar nova linha
else {NPC_PAIS_NC8_VF <- rbind.data.frame(NPC_PAIS_NC8_VF, New)}
``````

</>

Does N!=0 stands for N factorial equals zero?

Thank you.

No,
Where `N == 0` would mean N equals 0 (a test)
Similarly `N != 0` means N does not equal 0

nirgrahamuk

Thank you very much for your help to this my beginners doubt!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.