Description Usage Arguments Value Note See Also Examples
UNDER DEVELOPMENT. Adds variables to a sqlsurvey
object. Works by defining a MonetDB function to evaluate the new variable as needed. At the moment, variables created in one update
call cannot be used in another update
call. This should change eventually.
1 2 3 4 |
object |
|
... |
variables to add, in |
New sqlsurvey
object with added variables.
Functions and operators must exist in MonetDB SQL. The logical
operators and %in%
are translated to their SQL counterparts.
Especially for the sqlsurvey
objects there are some problems with boolean variables, so it's currently better to add zero to a boolean to make it numeric 0/1.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
## add variables for pulse pressure and hypertension to an NHANES
example object
sqhanes1 <- update(sqhanes, pulsep = bpxsar-bpxdar, htn = 0+(bpxsar>140 | bpxsar>90))
svymean(~bpxsar+bpxdar+pulsep, sqhanes, se=TRUE)
svymean(~bpxsar+bpxdar, subset(sqhanes, htn==1), se=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.