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,]
  
  MAD <- c(median(B)-2*mad(B), median(B)+2*mad(B))
  Lim_Inf <- MAD[1]
  Lim_Sup <- MAD[2]
  
  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)
  
  Res_2MAD <- if(VF<MAD[1]|VF>MAD[2]) {Res_2MAD <- "outlier"} else{Res_2MAD <- "normal"}
  
  #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.