Hi Emil, This mailing list is only for the data.table package. Find out about other lists here: https://www.r-project.org/mail.html
For reference, you probably want to link your SO post http://stackoverflow.com/q/37819796/1191259 --Frank On Tue, Jun 14, 2016 at 2:34 PM, phdmonster <[email protected]> wrote: > This here bugger worked perfectly until i changed the data set: > > for (k in m) { > mos_sub <- subset(work_table_ansfreq, !is.na(work_table_ansfreq[,r]) & > work_table_ansfreq$MOS_GROUP==k & !is.na(work_table_ansfreq$MOS_GROUP)) > freq_mos<- table(mos_sub[,r]) > qa[,k] <- freq_mos > } > For some reason it removes both NA values (which is normal) and one column > that actually has values. I will demonstrate. Output of the above code is: > > I provide care for someone who suffers from > Not applicable Prefer not to answer > 4 > 631 14 > Someone in my household suffers from > 1 > And when i include **exclude = NULL** in the table brackets i get this: > > I provide care for someone who suffers from > I suffer from Not applicable > 22 > 6 5258 > Prefer not to answer Someone in my > household suffers from <NA> > 94 > 13 0 > > How do i fix this? Meaning how do i exclude only the NA which should be the > only one excluded from the table anyway. > Thanks! > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Table-function-deletes-non-NA-values-in-R-tp4721792.html > Sent from the datatable-help mailing list archive at Nabble.com. > _______________________________________________ > datatable-help mailing list > [email protected] > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help >
_______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
