From c2a230b2df5746f20701efdad3d63d8b05899521 Mon Sep 17 00:00:00 2001 From: Florian Oswald Date: Thu, 7 Nov 2024 16:58:41 +0100 Subject: [PATCH] CRAN 2.3 --- DESCRIPTION | 2 +- R/build.panel.r | 29 ----------------------------- man/build.panel.Rd | 29 ----------------------------- 3 files changed, 1 insertion(+), 59 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 101600e..df9badf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: psidR Type: Package Title: Build Panel Data Sets from PSID Raw Data Version: 2.3 -Date: 2024-09-23 +Date: 2024-11-05 Authors@R: person(given = "Florian", family = "Oswald", role = c("aut", "cre"), diff --git a/R/build.panel.r b/R/build.panel.r index bcc732f..f0610f1 100644 --- a/R/build.panel.r +++ b/R/build.panel.r @@ -25,35 +25,6 @@ #' resulting \code{data.table}. the variable \code{pid} is the unique person identifier, constructed from ID1968 and pernum #' @export #' @examples -#' \dontrun{ -#' # ################################################ -#' # Real-world example: not tested during -#' # R CMD CHECK it because takes long. -#' # Build panel with income, wage, age and education -#' # optionally: add wealth supplements! -#' # ################################################ -#' -#' # The package is installed with a list of variables -#' # Alternatively, search for names with \code{\link{getNamesPSID}} -#' # This is the body of function build.psid() -#' r = system.file(package="psidR") -#' if (small){ -#' f = fread(file.path(r,"psid-lists","famvars-small.txt")) -#' i = fread(file.path(r,"psid-lists","indvars-small.txt")) -#' } else { -#' f = fread(file.path(r,"psid-lists","famvars.txt")) -#' i = fread(file.path(r,"psid-lists","indvars.txt")) -#' } -#' setkey(i,"name") -#' setkey(f,"name") -#' i = dcast(i[,list(year,name,variable)],year~name) -#' f = dcast(f[,list(year,name,variable)],year~name) -#' # executing this function will download data. takes long. -#' d = build.panel(datadir="~/datasets/psid/",fam.vars=f, -#' ind.vars=i, -#' heads.only =TRUE,sample="SRC", -#' design="all") -#' } #' #' # ###################################### #' # reproducible example on artifical data. diff --git a/man/build.panel.Rd b/man/build.panel.Rd index 805d8d4..11eced6 100644 --- a/man/build.panel.Rd +++ b/man/build.panel.Rd @@ -53,35 +53,6 @@ the \code{interview number} variable of a given year in the individual file. Run } \examples{ -\dontrun{ -# ################################################ -# Real-world example: not tested during -# R CMD CHECK it because takes long. -# Build panel with income, wage, age and education -# optionally: add wealth supplements! -# ################################################ - -# The package is installed with a list of variables -# Alternatively, search for names with \code{\link{getNamesPSID}} -# This is the body of function build.psid() -r = system.file(package="psidR") -if (small){ - f = fread(file.path(r,"psid-lists","famvars-small.txt")) - i = fread(file.path(r,"psid-lists","indvars-small.txt")) -} else { - f = fread(file.path(r,"psid-lists","famvars.txt")) - i = fread(file.path(r,"psid-lists","indvars.txt")) -} -setkey(i,"name") -setkey(f,"name") -i = dcast(i[,list(year,name,variable)],year~name) -f = dcast(f[,list(year,name,variable)],year~name) -# executing this function will download data. takes long. - d = build.panel(datadir="~/datasets/psid/",fam.vars=f, - ind.vars=i, - heads.only =TRUE,sample="SRC", - design="all") -} # ###################################### # reproducible example on artifical data.