[R] Survey package/svyby source code help

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Tue Feb 11 15:42:12 CET 2020


On Tue, 11 Feb 2020 02:33:45 +0000
AndertechLLC--- via R-help <r-help using r-project.org> wrote:

> When debugging the code I am not following the generation of values
> in the results object attr(*, "var")" after line 57 completes. These
> values are fed into line 74 (rval <- t(sapply(results, unwrap))).

Which version of the survey package you have in mind? I took a look at
the latest version available on CRAN (3.37 at the time of this post,
[*]) and the R/surveyby.R file has somewhat different code on lines 57
and 74.

In particular, attr(*, "var") is assigned much later, from variable
named covmat.mat, which is also computed later than line 74.

-- 
Best regards,
Ivan

[*] https://cran.r-project.org/src/contrib/survey_3.37.tar.gz



More information about the R-help mailing list