View source: R/compressweights.R

compressWeights | R Documentation |

Many replicate weight matrices have redundant rows, such as when
weights are the same for all observations in a PSU. This function
produces a compressed form. Methods for `as.matrix`

and
`as.vector`

extract and expand the weights.

```
compressWeights(rw, ...)
## S3 method for class 'svyrep.design'
compressWeights(rw,...)
## S3 method for class 'repweights_compressed'
as.matrix(x,...)
## S3 method for class 'repweights_compressed'
as.vector(x,...)
```

`rw` |
A set of replicate weights or a |

`x` |
A compressed set of replicate weights |

`...` |
For future expansion |

An object of class `repweights_compressed`

or a
`svyrep.design`

object with `repweights`

element of class `repweights_compressed`

`jknweights`

,`as.svrepdesign`

```
data(api)
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
rclus1c<-as.svrepdesign(dclus1,compress=TRUE)
rclus1<-as.svrepdesign(dclus1,compress=FALSE)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.