Skip to content

Commit 7bf16a7

Browse files
committed
Added LinkPersonalIDBySSN
1 parent 0d82508 commit 7bf16a7

File tree

6 files changed

+11
-33
lines changed

6 files changed

+11
-33
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
*feather*
99
*feather*
1010
.DS_Store
11-
update
11+
update
12+
UpdateDocumentation.R

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
export(getPrimaryPersonalID)
3+
export(linkPersonalIDBySSN)
44
export(mergeHmisCSVs)
55
export(trendActivelyHomeless)

R/LinkPersonalIDBySSN.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#' which should be a more unique identifier than the PersonalID alone.
44
#'
55
#' @param dataframe path to folder contaning first CSV set.
6+
#' @param primaryPersonalIDsOnly Default false. Returns a dataframe of only PrimaryPersonalIDs and PersonalIDs
67
#' @export
78
#' @examples
89
#'
@@ -13,7 +14,7 @@
1314
#' # Get a deduplicated Client
1415
#' clientDf2 <- unique(clientDf2)
1516

16-
getPrimaryPersonalID <- function(client){
17+
linkPersonalIDBySSN <- function(client, primaryPersonalIDsOnly = FALSE){
1718
library(sqldf)
1819
library(dplyr)
1920

@@ -57,5 +58,9 @@ getPrimaryPersonalID <- function(client){
5758
client$PersonalID <- as.character(client$PersonalID)
5859
client$PrimaryPersonalID[is.na(client$PrimaryPersonalID)] <- client$PersonalID[is.na(client$PrimaryPersonalID)]
5960

61+
if(primaryPersonalIDsOnly){
62+
client <- dataframe(client$PrimaryPersonalID, client$PersonalID)
63+
colnames(client) <- c("PrimaryPersonalID", "PersonalID")
64+
}
6065
client
6166
}

RHMIS.pdf

723 Bytes
Binary file not shown.

man/getPrimaryPersonalID.Rd

Lines changed: 0 additions & 27 deletions
This file was deleted.

man/mergeHmisCSVs.Rd

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)