Skip to content

Commit

Permalink
CRAN v2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
floswald committed Sep 24, 2024
1 parent f310858 commit 178540f
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 26 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: psidR
Type: Package
Title: Build Panel Data Sets from PSID Raw Data
Version: 2.2
Date: 2024-05-29
Version: 2.3
Date: 2024-09-23
Author: Florian Oswald
Maintainer: Florian Oswald <[email protected]>
Description: Makes it easy to build panel data in wide format from Panel Survey
Expand All @@ -15,8 +15,7 @@ Description: Makes it easy to build panel data in wide format from Panel Survey
waves. There are different panel data designs and sample subsetting criteria
implemented ("SRC", "SEO", "immigrant" and "latino" samples).
Depends: R (>= 3.5.0)
URL: https://github.com/floswald/psidR,
http://floswald.github.io/psidR/
URL: https://github.com/floswald/psidR
Imports:
data.table,
RCurl,
Expand All @@ -25,10 +24,11 @@ Imports:
openxlsx,
futile.logger
License: GPL-3
Encoding: UTF-8
Collate:
'build.panel.r'
'makeids.r'
'psidR-package.r'
Suggests:
testthat
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
6 changes: 3 additions & 3 deletions R/makeids.r
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ makeids.wealth <- function(){

#' get.psid connects to PSID database and downloads into Rda
#'
#' see \url{http://asdfree.com/} for other usage and \url{https://stackoverflow.com/questions/15853204/how-to-login-and-then-download-a-file-from-aspx-web-pages-with-r}
#' see \url{https://asdfree.com/} for other usage and \url{https://stackoverflow.com/questions/15853204/how-to-login-and-then-download-a-file-from-aspx-web-pages-with-r}
#' @author Anthony Damico <ajdamico@@gmail.com>
#' @param file string psid file number
#' @param name string of filename on disc
#' @param params postForm{RCurl} parameters
#' @param curl postForm{RCurl} curl handle
#' @param params `postForm` (RCurl) parameters
#' @param curl `postForm` (RCurl) curl handle
get.psid <- function( file , name , params , curl ){

html = postForm('http://simba.isr.umich.edu/u/Login.aspx', .params = params, curl = curl)
Expand Down
3 changes: 1 addition & 2 deletions R/psidR-package.r
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#' @importFrom openxlsx read.xlsx
#' @importFrom stats rlnorm rnorm runif
#' @importFrom utils object.size tail unzip head write.table
#' @docType package
#' @name psidR
#'
NULL
"_PACKAGE"
3 changes: 1 addition & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ citHeader("To cite the 'psidR' package in publications use:")
year = sub('.*(2[[:digit:]]{3})-.*', '\\1', meta$Date, perl = TRUE)
vers = paste('R package version', meta$Version)

citEntry(
entry = 'manual',
bibentry('manual',
title = paste('psidR:', meta$Title),
author = 'Florian Oswald',
year = year,
Expand Down
Binary file modified inst/psid-lists/psid.xlsx
Binary file not shown.
6 changes: 3 additions & 3 deletions man/get.psid.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions man/psidR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions tests/testthat/test_buildpanel.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,5 @@ test_that("check subsetting to core/immigrant/latino", {

} )

test_that("wrong famvars and indvars raises an error",{
cwf <- openxlsx::read.xlsx("http://psidonline.isr.umich.edu/help/xyr/psid.xlsx")
famvars = getNamesPSID("ER17013", cwf, years = c(2005, 2007, 2009))
expect_error(build.panel(datadir=my.dir,fam.vars=famvars) )

head_age_var_name <- getNamesPSID("ER17013", cwf, years=c(2003))

famvars = data.frame(year=c(2005, 2007, 2009),age=head_age_var_name)
expect_error(build.panel(datadir=my.dir,fam.vars=famvars) )

})


0 comments on commit 178540f

Please sign in to comment.