as.double.qw | R Documentation |
Converts data to numeric values: method for "qw" data.
## S3 method for class 'qw' as.double(x, ...)
x |
the object to be converted. |
... |
further arguments passed to or from other methods. |
A numeric representation of x
, using a method commonly refered
to as simple substitution.
The process of simple substitution proceeds in 4 steps for each kind of
censoring: none, interval, left and right. First uncensored data are
retained as is. Interval-censored data are converted by computing the mid
rnge. Left-censored data are converted sequentially from the lowest
censoring level, which is set to 1/2 the reporting level, any subsequent
levels are replaced by the mean of all values less than the current reporting
level. Conversion of right-censored data are not implemented in the current version
and result in an error.
The function as.double
is executed for as.numeric
.
fillIn
## Create a simple qw object Test.qw <- as.qw(c(1,2,3,2,4,4), c("<", "<", "<", " ", " ", " "), "", NA_real_, "Miss", "None", "Mine", "TEST", "") as.double(Test.qw) as.numeric(Test.qw)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.