[R] Missing Values in Table Statement

Shivi82 shivibhatia at ymail.com
Sat Jun 13 06:36:23 CEST 2015


HI Don,

This is the exact result i need. However in my case i am not getting any
value under TRUE whereas FALSE captures total observations in each variable.
Please find the syntax and output from the code:
table(test$ORIGIN_NAME,is.na(test$SCH_TIME))

Output
                                 FALSE
  BAHADURGARH            15
  BAREILLY                    44
  BAWAL                        34
  DELHI-11                   2446
  DELHI-39                   170
  DELHI-40                   86
  DELHI NCR-12            1925

The data from str is attached:
data.frame':	10765 obs. of  18 variables:
 $ ORIGIN         : chr  "DLI11" "DLI11" "NDA50" "NDA50" ...
 $ ORIGIN_NAME    : chr  "DELHI-11" "DELHI-11" "NOIDA-50" "NOIDA-50" ...
 $ DESTINATION    : chr  "NDA50" "NDA50" "DLI11" "NDA11" ...
 $ DESTINATION_NM : chr  "NOIDA-50" "NOIDA-50" "DELHI-11" "NOIDA-11" ...
 $ RPS_NO         : int  1350760 1366368 1352692 1354642 1354642 1349180
1349180 1356091 1348591 1348591 ...
 $ VENDOR_NAME    : chr  "RAJIV GAUTAM" "RAJIV GAUTAM" "RAJIV GAUTAM" "RAJIV
GAUTAM" ...
 $ CR_DT          : chr  "13-Mar-15" "31-Mar-15" "15-Mar-15" "17-Mar-15" ...
 $ SCHD_MRKT      : chr  "SCHEDULE" "SCHEDULE" "SCHEDULE" "MARKET" ...
 $ VHL_NO         : chr  "HR63A0931" "HR63A0931" "HR63A0931" "HR63A0931" ...
 $ vhl_cap        : int  8 8 8 8 8 8 8 8 8 8 ...
 $ SCH_TIME       : chr  "6:00" "6:00" "21:30" "" ...
 $ ACTUAL_DEP_DATE: chr  "13/03/2015" "31/03/2015" "15/03/2015" "17/03/2015"
...
 $ ACTUAL_DEP_TIME: chr  "6:30" "4:05" "13:37" "20:15" ...
 $ WAYBILLS       : chr  "-" "-" "-" "3" ...
 $ TOTAL_PKG      : int  0 0 0 40 256 6 0 0 16 427 ...
 $ ACTUAL_WT      : int  0 0 0 744 3419 65 0 0 193 7223 ...
 $ CHG_WT         : int  0 0 0 770 3730 70 0 0 210 7310 ...
 $ RTE_CD         : chr  "DELHI-11-NOIDA-50(DLI11-NDA50)"
"DELHI-11-NOIDA-50(DLI11-NDA50)" "NOIDA-50-DELHI-11(NDA50-DLI11)"
"NOIDA-50-DELHI-11(NDA50-NDA11-DLI11)"
Scheduled time here is character, could this be the reason for the incorrect
result. 

Thanks, Shivi




--
View this message in context: http://r.789695.n4.nabble.com/Missing-Values-in-Table-Statement-tp4708534p4708593.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list