Debian Codegraph @

man/neg2mis.Rd

raw
1 \name{neg2mis}
2 \alias{neg2mis}
3 \title{Mark Negative Values as Missing}
4 \description{In many newer survey data sets available from social
5 science data archives non-valid responses (such as "don't know" or
6 "answer refused") are given negative codes. The function
7 \code{neg2miss} allows to mark them as missing values.)
8 }
9 \usage{
10 neg2mis(x,all=FALSE,exclude=NULL,select=NULL,zero=FALSE)
11 }
12 \arguments{
13 \item{x}{an object that inherits from class "item.list", e.g. a
14 "data.set" or an "importer" object.}
15 \item{all}{logical; should the marking of negative values as missing
16 applied to all variables?}
17 \item{exclude}{an optional vector of variable naems to which
18 the marking of negative values as missing should \emph{not} be
19 applied.}
20 \item{select}{an optional vector of variable names to which
21 the marking of negative values as missing should be applied.}
22 \item{zero}{logical; should zeroes also be marked as missing?}
23 }
24 \examples{
25 ds <- data.set(
26 var1 = c(0,1,-1,2,3),
27 var2 = c(-1,-1,1,1,1),
28 var3 = c(1,2,3,4,5)
29 )
30 neg2mis(ds,all=TRUE)
31 neg2mis(ds,all=TRUE,zero=TRUE)
32 neg2mis(ds,exclude=var1)
33 neg2mis(ds,select=var1)
34 }