Skip to content

Commit 3fe6a89

Browse files
committed
CRAN submission
1 parent cb0d559 commit 3fe6a89

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

R/build.panel.r

+4-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
#' ind.vars=i,
5454
#' heads.only =TRUE,sample="SRC",
5555
#' design="all")
56-
#' save(d,file="~/psid.RData")
5756
#' }
5857
#'
5958
#' # ######################################
@@ -131,6 +130,7 @@ build.panel <- function(datadir=NULL,fam.vars,ind.vars=NULL,heads.only=FALSE,cur
131130
# or R CMD CHECK complains.
132131

133132
interview <- headyes <- .SD <- fam.interview <- ind.interview <- ind.head <- ER30001 <- ind.head.num <- pid <- ID1968 <- pernum <- isna <- present <- always <- enough <- ind.seq <- name <- variable <- NULL
133+
oldopts <- NULL
134134

135135
stopifnot(is.numeric(fam.vars$year))
136136
years <- fam.vars$year
@@ -140,6 +140,8 @@ build.panel <- function(datadir=NULL,fam.vars,ind.vars=NULL,heads.only=FALSE,cur
140140
s <- .Platform$file.sep
141141
if ( .Platform$OS.type != 'windows' ) {
142142
# warning("I'm setting your encoding to windows now")
143+
oldopts <- options() # code line i
144+
on.exit(oldopts) # code line i + 1
143145
options( encoding = "windows-1252" ) # # only macintosh and *nix users need this line
144146
}
145147

@@ -767,8 +769,7 @@ build.psid <- function(datadr="~/datasets/psid/",small=TRUE){
767769
i = dcast(i[,list(year,name,variable)],year~name, value.var = "variable")
768770
f = dcast(f[,list(year,name,variable)],year~name, value.var = "variable")
769771
d = build.panel(datadir=datadr,fam.vars=f,ind.vars=i, heads.only = TRUE,sample="SRC",design="all")
770-
save(d,file="~/psid_no_wealth.RData")
771-
772+
772773
return(d)
773774
}
774775

man/build.panel.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)